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

NPE in maven/ibm-javaee8-webprofile-liberty quickstart #1654

Closed
manusa opened this issue Jul 14, 2022 · 0 comments · Fixed by #1655
Closed

NPE in maven/ibm-javaee8-webprofile-liberty quickstart #1654

manusa opened this issue Jul 14, 2022 · 0 comments · Fixed by #1655
Assignees
Labels
bug Something isn't working
Milestone

Comments

@manusa
Copy link
Member

manusa commented Jul 14, 2022

Description

When running the quickstarts/maven/ibm-javaee8-webprofile-liberty example a NPE is thrown

$ mvn -P'integration-tests' clean verify -DtestProxyHost=$(minikube ip)
Caused by: java.lang.NullPointerException
    at org.eclipse.jkube.kit.build.service.docker.BuildService.autoPullBaseImage (BuildService.java:250)
    at org.eclipse.jkube.kit.build.service.docker.BuildService.buildImage (BuildService.java:75)
    at org.eclipse.jkube.kit.config.service.kubernetes.DockerBuildService.buildSingleImage (DockerBuildService.java:59)
    at org.eclipse.jkube.kit.config.service.AbstractImageBuildService.processImage (AbstractImageBuildService.java:53)
    at org.eclipse.jkube.kit.config.service.AbstractImageBuildService.build (AbstractImageBuildService.java:34)
    at org.eclipse.jkube.maven.plugin.mojo.build.AbstractDockerMojo.buildAndTag (AbstractDockerMojo.java:631)
...

This is caused during the build phase because it's not being skipped. The behavior started in v1.6.0, in v1.5.1 this wasn't a problem because ImageConfiguration.buildConfig was checked before proceeding with the build:

https://github.com/eclipse/jkube/blob/3455471f7492508ce6ec220642b31d8339e3b8fd/kubernetes-maven-plugin/plugin/src/main/java/org/eclipse/jkube/maven/plugin/mojo/build/AbstractDockerMojo.java#L487-L493

I'm still not sure if we actually removed the check for the buildconfig to allow other scenarios.

The check seems to be here, but is incomplete:

https://github.com/eclipse/jkube/blob/3f17790e0e34dcbbb8b9f8209f743701514104e8/jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/AbstractImageBuildService.java#L47-L57

Related to

@manusa manusa added the bug Something isn't working label Jul 14, 2022
@manusa manusa self-assigned this Jul 14, 2022
@manusa manusa added this to the 1.9.0 milestone Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant