Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates version of DockerSpotifyClient to 3.5.13 and fixes NullPointerException #749

Merged
merged 1 commit into from
Mar 3, 2016

Conversation

vsuharnikov
Copy link
Contributor

NullPointerException is appeared, when i try to build & publish an image to a local Docker Registry at first time (after clean):

[info] PublishLocal using Docker API 1.22
[info] Step 1 : FROM lwieske/java-8:jre-8u72-slim
[trace] Stack trace suppressed: run last server/docker:publishLocal for the full output.
[error] (server/docker:publishLocal) java.lang.NullPointerException
[error] Total time: 154 s, completed Mar 3, 2016 1:25:22 PM
> last server/docker:publishLocal
[info] PublishLocal using Docker API 1.22
[info] Step 1 : FROM lwieske/java-8:jre-8u72-slim
java.lang.NullPointerException
  at sbt.ConsoleLogger.log(ConsoleLogger.scala:195)
  at sbt.ConsoleLogger.log(ConsoleLogger.scala:185)
  at sbt.AbstractLogger.log(Logger.scala:28)
  at sbt.MultiLogger$$anonfun$dispatch$1.apply(MultiLogger.scala:35)
  at sbt.MultiLogger$$anonfun$dispatch$1.apply(MultiLogger.scala:33)
  at scala.collection.immutable.List.foreach(List.scala:318)
  at sbt.MultiLogger.dispatch(MultiLogger.scala:33)
  at sbt.MultiLogger.log(MultiLogger.scala:27)
  at sbt.Logger$class.info(Logger.scala:118)
  at sbt.AbstractLogger.info(Logger.scala:11)
  at com.typesafe.sbt.packager.docker.DockerSpotifyClientPlugin$$anonfun$publishLocalDocker$1$$anon$1.progress(DockerSpotifyClientPlugin.scala:80)
  at com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:939)
  at com.spotify.docker.client.DefaultDockerClient.build(DefaultDockerClient.java:888)
  at com.typesafe.sbt.packager.docker.DockerSpotifyClientPlugin$$anonfun$publishLocalDocker$1.apply(DockerSpotifyClientPlugin.scala:76)
  at com.typesafe.sbt.packager.docker.DockerSpotifyClientPlugin$$anonfun$publishLocalDocker$1.apply(DockerSpotifyClientPlugin.scala:65)
  at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
  at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
  at sbt.std.Transform$$anon$4.work(System.scala:63)
  at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
  at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
  at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
  at sbt.Execute.work(Execute.scala:235)
  at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
  at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
  at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
  at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)
[error] (server/docker:publishLocal) java.lang.NullPointerException

This PR fixes that issue.

@lightbend-cla-validator
Copy link

Hi @vsuharnikov,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@@ -77,10 +77,11 @@ object DockerSpotifyClientPlugin extends AutoPlugin {
def progress(message: ProgressMessage) = {
Option(message.error()) match {
case Some(error) if error.nonEmpty => log.error(message.error())
case _ => log.info(message.stream())
case _ if message.stream() != null => log.info(message.stream())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy Issue found: Avoid using null

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that it would be simpler than foreach, but ok, i will change it :)

@lightbend-cla-validator
Copy link

Hi @vsuharnikov,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@muuki88
Copy link
Contributor

muuki88 commented Mar 3, 2016

Awesome, thanks :)

muuki88 added a commit that referenced this pull request Mar 3, 2016
Updates version of DockerSpotifyClient to 3.5.13 and fixes NullPointerException
@muuki88 muuki88 merged commit 9fb55c7 into sbt:master Mar 3, 2016
@muuki88 muuki88 added the docker label Mar 3, 2016
@vsuharnikov vsuharnikov deleted the update-docker-spotify branch March 3, 2016 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants