You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to get a PoC working for Helidon command line application.
Since Helidon 4.0.9, I am able to compile a sample Hibernate application to native with Graal 21.
However, I am having trouble translating that success to my
Proof of Concept application: https://github.com/flowlogix/native-java/tree/main/helidon/helidon-greeter
I am getting the following error:
[INFO] --- native:0.10.2:compile-no-fork (build-native-image) @ helidon-greeter ---
[INFO] Obtained main class from plugin org.apache.maven.plugins:maven-jar-plugin with the following path: archive -> manifest -> mainClass
[INFO] Found GraalVM installation from JAVA_HOME variable.
[WARNING] GraalVM reachability metadata repository is disabled
[INFO] Executing: /Users/software/.sdkman/candidates/java/21.0.2-graalce/bin/native-image @target/tmp/native-image-743254677462804173.args com.flowlogix.example.HelloEntryPoint
Warning: The option '-H:IncludeResourceBundles=yasson-messages' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future.
Warning: Please re-evaluate whether any experimental option is required, and either remove or unlock it. The build output lists all active experimental options, including where they come from and possible alternatives. If you think an experimental option should be considered as stable, please file an issue.
========================================================================================================================
GraalVM Native Image: Generating 'helidon-greeter-1.x-SNAPSHOT' (executable)...
========================================================================================================================
[1/8] Initializing... (7.6s @ 0.16GB)
Java version: 21.0.2+13, vendor version: GraalVM CE 21.0.2+13.1
Graal compiler: optimization level: 2, target machine: native
C compiler: cc (apple, arm64, 15.0.0)
Garbage collector: Serial GC (max heap size: 80% of RAM)
4 user-specific feature(s):
- com.oracle.svm.thirdparty.gson.GsonFeature
- io.helidon.integrations.graal.mp.nativeimage.extension.HelidonMpFeature
- io.helidon.integrations.graal.nativeimage.extension.HelidonReflectionFeature
- org.eclipse.angus.activation.nativeimage.AngusActivationFeature
------------------------------------------------------------------------------------------------------------------------
1 experimental option(s) unlocked:
- '-H:IncludeResourceBundles' (origin(s): 'META-INF/native-image/org.eclipse/yasson/native-image.properties' in 'file:///Users/lprimak/.m2/repository/org/eclipse/yasson/3.0.3/yasson-3.0.3.jar')
------------------------------------------------------------------------------------------------------------------------
Build resources:
- 12.09GB of memory (75.6% of 16.00GB system memory, determined at start)
- 8 thread(s) (100.0% of 8 available processor(s), determined at start)
2024.06.10 10:46:19 WARNING io.helidon.common.features.HelidonFeatures Thread[#1,main,5,main]: Feature 'Hibernate' for path 'JPA/Hibernate' has limited support in native image: Experimental support, tested on limited use cases
2024.06.10 10:46:19 WARNING io.helidon.common.features.HelidonFeatures Thread[#1,main,5,main]: Feature 'JTA' for path 'JTA' has limited support in native image: Experimental support, tested on limited use cases
[2/8] Performing analysis... [*] (96.8s @ 3.20GB)
25,550 reachable types (91.2% of 28,027 total)
37,065 reachable fields (64.8% of 57,210 total)
124,022 reachable methods (60.4% of 205,415 total)
8,122 types, 757 fields, and 13,288 methods registered for reflection
1 native library: -framework CoreServices
Error: Classes that should be initialized at run time got initialized during image building:
org.eclipse.yasson.internal.JsonbContext was unintentionally initialized at build time. To see why org.eclipse.yasson.internal.JsonbContext got initialized use --trace-class-initialization=org.eclipse.yasson.internal.JsonbContext
To see how the classes got initialized, use --trace-class-initialization=org.eclipse.yasson.internal.JsonbContext
------------------------------------------------------------------------------------------------------------------------
13.4s (12.4% of total time) in 110 GCs | Peak RSS: 2.55GB | CPU load: 3.36
========================================================================================================================
Finished generating 'helidon-greeter-1.x-SNAPSHOT' in 1m 47s.
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------------------------------------------------------------
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Relates to #8072 and #8863 and #8866
I have been trying to get a PoC working for Helidon command line application.
Since Helidon 4.0.9, I am able to compile a sample Hibernate application to native with Graal 21.
However, I am having trouble translating that success to my
Proof of Concept application: https://github.com/flowlogix/native-java/tree/main/helidon/helidon-greeter
I am getting the following error:
Can someone help me resolve this? @tvallin @tomas-langer @ljnelson ?
Beta Was this translation helpful? Give feedback.
All reactions