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

Native image build fails with Maven and Java 21 #40497

Closed
buncicka opened this issue Apr 24, 2024 · 3 comments
Closed

Native image build fails with Maven and Java 21 #40497

buncicka opened this issue Apr 24, 2024 · 3 comments
Labels
for: external-project For an external project and not something we can fix status: duplicate A duplicate of another issue

Comments

@buncicka
Copy link

buncicka commented Apr 24, 2024

Running mvn -P native spring-boot:build-image fails with

 Paketo Buildpack for BellSoft Liberica 10.2.6
[INFO]     [creator]       unable to find dependency
[INFO]     [creator]       no valid dependencies for native-image-svm, 22, and io.paketo.stacks.tiny in [(jdk, 8.0.372, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 8.0.372, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jdk, 11.0.19, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 11.0.19, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (native-image-svm, 11.0.19, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jdk, 17.0.7, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 17.0.7, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (native-image-svm, 17.0.7, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jdk, 20.0.1, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 20.0.1, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *])]
[INFO]     [creator]     ERROR: failed to build: exit status 1

Does anyone know how to solve this problem?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 24, 2024
@wilkinsona
Copy link
Member

It looks like you're using Java 22 rather than Java 21:

[INFO]     [creator]       no valid dependencies for native-image-svm, 22

I think this is a duplicate of paketo-buildpacks/bellsoft-liberica#565.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
@wilkinsona wilkinsona added status: duplicate A duplicate of another issue for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 24, 2024
@buncicka
Copy link
Author

buncicka commented Apr 25, 2024

Yes, but when i changed to use java 21, error is the same:

[INFO]     [creator]     Paketo Buildpack for BellSoft Liberica 10.2.6
[INFO]     [creator]       unable to find dependency
[INFO]     [creator]       no valid dependencies for native-image-svm, 21, and io.paketo.stacks.tiny in [(jdk, 8.0.372, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 8.0.372, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jdk, 11.0.19, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 11.0.19, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (native-image-svm, 11.0.19, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jdk, 17.0.7, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 17.0.7, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (native-image-svm, 17.0.7, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jdk, 20.0.1, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *]) (jre, 20.0.1, [io.buildpacks.stacks.bionic io.paketo.stacks.tiny *])]
[INFO]     [creator]     ERROR: failed to build: exit status 1

@wilkinsona
Copy link
Member

You're using 10.2.6 of the BellSoft Liberica Buildpack. That's fairly old and does not support Java 21. I can also see that you're also using the Bionic stack and, presumably, the Bionic-based builder which is no longer supported. https://blog.paketo.io/posts/paketo-bionic-builder-is-unsafe/ describes the situation and explains how to upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants