-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
1.0.0 RC7 breaks support for Micronaut/Netty: No instances are allowed in the image heap #713
Comments
Possibly relates to #712 |
Can you try pushing the initialization of |
@cstancu If I do that it now fails with:
If I try add
|
You cannot delay |
I made the following change: --- a/app-with-discovery/build-native-image.sh
+++ b/app-with-discovery/build-native-image.sh
@@ -8,4 +8,5 @@ native-image --class-path build/libs/app-with-discovery-0.1-all.jar \
-H:Class=app.with.discovery.Application \
-H:+ReportUnsupportedElementsAtRuntime \
-H:+AllowVMInspection \
- --delay-class-initialization-to-runtime=io.netty.handler.codec.http.HttpObjectEncoder,io.netty.handler.codec.http.websocketx.WebSocket00FrameEncoder,io.netty.handler.codec.http.HttpObjectDecoder
+ --delay-class-initialization-to-runtime=io.netty.handler.codec.http.HttpObjectEncoder,io.netty.handler.codec.http.websocketx.WebSocket00FrameEncoder,io.netty.handler.codec.http.HttpObjectDecoder,io.netty.handler.ssl.util.ThreadLocalInsecureRandom \
+ --rerun-class-initialization-at-runtime=sun.security.jca.JCAUtil$CachedSecureRandomHolder But it still fails with the same error:
|
Can you point me to the repo/branch to replicate this? |
Trying to build I fail with
|
@cstancu are you behind a proxy? I cleaned my Maven and Gradle caches and it seems to work fine. You need to able to resolve snapshots from https://oss.sonatype.org/content/repositories/snapshots |
@cstancu maybe the step to install the Graal SVM dependency is missing?
If you install the RC7 SVM jar you will need to update the reference in the |
We are hitting the same issue. We have a reproduction available here. This is the error we are seeing:
I am also happy to jump on a call if this easier for you @cstancu |
@graemerocher I already had the SVM dependency installed. What I needed was to clean the maven and gradle caches. Now
|
@graemerocher never mind, it looks like the |
@graemerocher the problem is the |
@cstancu great news, yes the example needs consul running. If you want to try it further you can do
|
@mavilein you need |
@graemerocher I tried your app further but it looks like the image is missing some reflection config: |
As a resolution for this issue:
|
@cstancu btw when I add --rerun-class-initialization-at-runtime=javax.net.ssl.SSLContext a default for when --enable-all-security-services to the app above (just as a test to the impact on it). The application fails to build with:
|
@graemerocher I cannot replicate the NPE trace that you posted above. I pulled in your latest changes to the |
@graemerocher @cstancu Are there any updates on this issue? |
@archerz are you seeing issues with Micronaut 1.0 related to this? |
@graemerocher With The command I'm using is:
And the error:
|
@archerz Try |
Although some folks have got Micronaut working with RC8, think you need to pass |
I'll close this since it is an old issue that should be fixed in the latest GraalVM RC. Please reopen or open a new issue if you still have problems. |
With RC7 and attempting to build a native image that previously worked in RC6 results in:
Further trace:
Are there any new flags that should be passed to avoid this? Or am I missing something
The text was updated successfully, but these errors were encountered: