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

EclipseLink Sample fails to compile to Graal Native Image #8866

Open
lprimak opened this issue Jun 10, 2024 · 0 comments · May be fixed by #8871
Open

EclipseLink Sample fails to compile to Graal Native Image #8866

lprimak opened this issue Jun 10, 2024 · 0 comments · May be fixed by #8871
Assignees
Labels
4.x Version 4.x archetypes bug Something isn't working native-image
Projects

Comments

@lprimak
Copy link

lprimak commented Jun 10, 2024

Helidon-Cli-generated database sample using EclipseLink fails to compile to native image

Environment Details

  • Helidon Version: 4.0.9
  • Helidon MP
  • JDK version: 21.0.2-GraalCE
  • OS: Mac
  • Docker version (if applicable): N/A

Problem Description

Relates to #8096 and #8863

[INFO] Executing: /Users/software/.sdkman/candidates/java/21.0.2-graalce/bin/native-image @target/tmp/native-image-12819747542601040959.args io.helidon.Main
Warning: The option '-H:IncludeResourceBundles=yasson-messages' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future.
Warning: The option '-H:ReflectionConfigurationResources=META-INF/native-image/io.micrometer/micrometer-core/reflect-config.json' 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 'database-mp' (executable)...
========================================================================================================================
2024.06.10 10:23:45 INFO io.helidon.logging.jul.JulProvider Thread[#1,main,5,main]: Logging at initialization configured using classpath: /logging.properties
[1/8] Initializing...                                                                                    (7.0s @ 0.20GB)
 Java version: 21.0.2+13, vendor version: GraalVM CE 21.0.2+13.1
 Graal compiler: optimization level: 2, target machine: armv8-a
 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
------------------------------------------------------------------------------------------------------------------------
 2 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')
 - '-H:ReflectionConfigurationResources' (origin(s): 'META-INF/native-image/io.micrometer/micrometer-core/native-image.properties' in 'file:///Users/lprimak/.m2/repository/io/micrometer/micrometer-core/1.11.3/micrometer-core-1.11.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:23:50 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...  [*]                                                                      (110.1s @ 3.91GB)
   24,601 reachable types   (90.6% of   27,157 total)
   39,090 reachable fields  (66.8% of   58,497 total)
  131,334 reachable methods (64.1% of  204,744 total)
    7,492 types,   883 fields, and 14,373 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.persistence.platform.server.ServerPlatformUtils was unintentionally initialized at build time. To see why org.eclipse.persistence.platform.server.ServerPlatformUtils got initialized use --trace-class-initialization=org.eclipse.persistence.platform.server.ServerPlatformUtils
org.eclipse.persistence.jpa.PersistenceProvider$Proxy$_$$_WeldClientProxy was unintentionally initialized at build time. To see why org.eclipse.persistence.jpa.PersistenceProvider$Proxy$_$$_WeldClientProxy got initialized use --trace-class-initialization=org.eclipse.persistence.jpa.PersistenceProvider$Proxy$_$$_WeldClientProxy
org.eclipse.persistence.internal.security.PrivilegedAccessHelper was unintentionally initialized at build time. To see why org.eclipse.persistence.internal.security.PrivilegedAccessHelper got initialized use --trace-class-initialization=org.eclipse.persistence.internal.security.PrivilegedAccessHelper
To see how the classes got initialized, use --trace-class-initialization=org.eclipse.persistence.platform.server.ServerPlatformUtils,org.eclipse.persistence.jpa.PersistenceProvider$Proxy$_$$_WeldClientProxy,org.eclipse.persistence.internal.security.PrivilegedAccessHelper
------------------------------------------------------------------------------------------------------------------------
                       16.6s (13.8% of total time) in 70 GCs | Peak RSS: 3.02GB | CPU load: 3.10
========================================================================================================================
Finished generating 'database-mp' in 1m 59s.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Steps to reproduce

  • Use Helidon CLI to generate database sample w/EclipseLink
  • mvn package -Pnative-image
@github-actions github-actions bot added this to Triage in Backlog Jun 10, 2024
@tvallin tvallin self-assigned this Jun 11, 2024
@edbratt edbratt moved this from Triage to Sprint Scope in Backlog Jun 13, 2024
@edbratt edbratt added the bug Something isn't working label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x archetypes bug Something isn't working native-image
Projects
Backlog
  
Sprint Scope
Development

Successfully merging a pull request may close this issue.

3 participants