-
Notifications
You must be signed in to change notification settings - Fork 3k
Substitute BootLoader.hasClassPath() to work around a JDK 11 NPE #6090
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
Substitute BootLoader.hasClassPath() to work around a JDK 11 NPE #6090
Conversation
This fixes the NullPointerException and allows the integration tests to end successfully. @stuartwdouglas Does this look like a reasonable fix? I'm not really in my field of expertise here so I might be doing something totally wrong. |
This looks reasonable but you should file a GraalVM issue so it can be fixed upstream. |
Sure, I'll do it. Thanks for having a look! |
GraalVM issue created: oracle/graal#1966 |
@gsmet This might be the solution to all the JDK 11 native integration tests that failed to start recently. It had definitely nothing to do with the time the native image needed to start :) |
core/runtime/src/main/java/io/quarkus/runtime/graal/BootLoaderSubstitutions.java
Show resolved
Hide resolved
Hello @gwenneg, I just commented on that graal issue you opened. The graal team has fixed it in I think we will need this workaround in Quarkus until 19.3.x is released with that fix. Their commit is different from what is being proposed in this PR - they return |
I don't think we can copy the entire |
Actually, changing the returned value from |
Hello @gwenneg, sorry, I wasn't clear. I actually meant, we should just copy over those 5 new |
Oh, I misunderstood you first comment (which was clear enough), sorry :) That will work and I'll do it right now. |
fc81691
to
3d1e4de
Compare
This PR needs to be tested with a full JDK 11 native build. PLEASE DON'T MERGE before I say it's OK. |
Thanks for your help with this @jaikiran! |
I've successfully tested the latest version of this PR with many JDK 11 native integration tests. I think it can be safely merged into master after being reviewed again. |
I just saw a similar NPE that may be related, I'm putting the PR back to WIP to investigate what's going on. |
5939fae
to
90f175c
Compare
I created #6127 to fix the similar NPE mentioned above. Both share a common root cause but require different and independent substitutions to be fixed. I think merging this PR ASAP is important because it might help us detect new issues during native tests execution, that's why I didn't treat #6127 in the same PR. @gsmet: We're ready for a final review and merge, for real this time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, @gwenneg .
Fixes #6089