Possible NPE from DockerConfigCredentialRetriever with 2.4.0
See original GitHub issue@Gsealy reported NPE on Jib 2.4.0. This looks like a regression introduced by #2489.
Environment: Windows Terminal
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T02:41:47+08:00)
Maven home: C:\apache-maven\bin\..
Java version: 11, vendor: Oracle Corporation, runtime: C:\Java\jdk-11
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
docker for windows version:
docker desktop: 2.3.0(45519)
Docker version 19.03.8, build afacb8b
Credntial Helper: 0.6.3
jib-maven-plugin
Configuration:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>2.4.0</version>
<configuration>
<from>
<image>hub.gsealy.cn/base-image/jdk:11.0</image>
</from>
<to>
<image>spring-boot-jib</image>
</to>
<allowInsecureRegistries>true</allowInsecureRegistries>
<container>
<ports>
<port>9999</port>
</ports>
</container>
</configuration>
</plugin>
description:
we are use harbor for docker registry at inner network, and use Let’s encrypt cert for ssl. 2.3.0
also print warning but build succeed.
I don’t find docker-credential-desktop.cmd
in system, just have docker-credential-desktop.exe
... omit ...
[DEBUG] trying docker-credential-desktop for hub.gsealy.cn
[WARNING] Cannot run program "docker-credential-desktop.cmd": CreateProcess error=2, cannot find the file.
[WARNING] Caused by: CreateProcess error=2, cannot find the file.
... omit ...
but 2.4.0
was facing the NPE
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.4.0:buildTar (default-cli) on project
jib: (null exception message): NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.4.0:buildTar (default-cli) on project jib: (null exception message)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: (null exception message)
at com.google.cloud.tools.jib.maven.BuildTarMojo.execute (BuildTarMojo.java:140)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.NullPointerException
at java.lang.String.<init> (String.java:561)
at com.google.cloud.tools.jib.registry.credentials.DockerConfigCredentialRetriever.retrieve (DockerConfigCredentialRetriever.java:146)
at com.google.cloud.tools.jib.registry.credentials.DockerConfigCredentialRetriever.retrieve (DockerConfigCredentialRetriever.java:104)
at com.google.cloud.tools.jib.frontend.CredentialRetrieverFactory.lambda$dockerConfig$4 (CredentialRetrieverFactory.java:277)
at com.google.cloud.tools.jib.builder.steps.RegistryCredentialRetriever.retrieve (RegistryCredentialRetriever.java:47)
at com.google.cloud.tools.jib.builder.steps.RegistryCredentialRetriever.getBaseImageCredential (RegistryCredentialRetriever.java:34)
at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.call (PullBaseImageStep.java:134)
at com.google.cloud.tools.jib.builder.steps.PullBaseImageStep.call (PullBaseImageStep.java:56)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly (TrustedListenableFutureTask.java:125)
at com.google.common.util.concurrent.InterruptibleTask.run (InterruptibleTask.java:69)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run (TrustedListenableFutureTask.java:78)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
at java.lang.Thread.run (Thread.java:834)
_Originally posted by @Gsealy in https://github.com/GoogleContainerTools/jib/issues/2527#issuecomment-646463172_
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Why do I still receive warning for possible NPE in IntelliJ when ...
The inspector is not completely wrong. It is possible that you could have a NullPointerException in this case: since you are calling Service ......
Read more >Ready API 2.4.0 - java.lang.NullPointerException f...
Hello, I have upgraded to Ready API 2.4.0 and have started to receive a java.lang.NullPointerException when clicking the report icon after a ...
Read more >NPE on scrolled queries - Elasticsearch - Elastic Discuss
Hi, I have a problme with a cluster of 4 nodes with ES 2.4.0 ... If I query for the scrollId I get...
Read more >Null Pointer Exception in ambari-server logs after... - 230533
The issue that you are afcing indicates Ambari DB Corruption. As we see that /request URL itslef is throwing NullPointerException so it will...
Read more >[play 2.4 - java] Execution exception [NullPointerException
throwableToUsefulException(HttpErrorHandler.scala:254) ~[play_2.11-2.4.0.jar:2.4.0] at play.api.http.DefaultHttpErrorHandler.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Gsealy Jib Maven 2.5.2 and Jib Gradle 2.5.0 are released with the fix. It should be OK to have an
auths
entry without theauth
property.@Gsealy until we release Jib 2.5.0, for now (2.4.0) you can set
Or, in
pom.xml
,You can also do this on the command-line with
-Djib.from.credHelper=desktop.exe
(or-Djib.to.credhelper
).This issue that Jib doesn’t try
.exe
is fixed (#2527), so you will be able to restore the values back todesktop
with the next Jib 2.5.0 release.