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 am currently using any plugin to package Maven projects into JAR files. My project is a JavaFX project with CSS and FXML. When executing - agentlib: native image agent, it will start my project, but clicking on the above operation will result in an error and the final generated native image is incomplete.
(base) PS C:\Users\16973\IdeaProjects\demo\target> java -agentlib:native-image-agent=config-merge-dir=native-image -jar .\demo-1.0-SNAPSHOT.jar
4月 21, 2025 10:15:04 上午 com.sun.javafx.application.PlatformImpl startup
警告: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @42dd317f'
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.sun.glass.utils.NativeLibLoader in an unnamed module (file:/C:/Users/16973/IdeaProjects/demo/target/depen
dencies/javafx-graphics-17.0.6-win.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::allocateMemory has been called by com.sun.marlin.OffHeapArray (file:/C:/Users/16973/IdeaProjects/demo/target/dependencies/javafx-graph
ics-17.0.6-win.jar)
WARNING: Please consider reporting this to the maintainers of class com.sun.marlin.OffHeapArray
WARNING: sun.misc.Unsafe::allocateMemory will be removed in a future release
Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,findResourceAsStream),(caller_class,java.lang.Module),(result,true),(args,[com/sun
/javafx/reflect/Trampoline.class])}): java.lang.IllegalArgumentException: List must have exactly 2 element(s)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.AbstractProcessor.expectSize(AbstractProcessor.java:52)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:79)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:91)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.tracing.ConfigurationResultWriter.traceEntry(ConfigurationResultWriter.java:53)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.tracing.core.Tracer.traceCall(Tracer.java:126)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:192)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:181)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleResourceRegistration(BreakpointInterceptor.java:615)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.findResource(BreakpointInterceptor.java:628)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1206)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.headers.JNIFunctionPointerTypes$GetMethodIDFunctionPointer.invoke(JNIFunctionPointerTypes.jav
a)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.resolveBreakpointMethod(BreakpointInterceptor.java:1539)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.installBreakpointIfClassLoader(BreakpointInterceptor.java:1274)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onClassPrepare(BreakpointInterceptor.java:1266)
Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,findResourceAsStream),(caller_class,java.lang.Module),(result,true),(args,[com/sun
/javafx/reflect/Trampoline.class])}): java.lang.IllegalArgumentException: List must have exactly 2 element(s)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.AbstractProcessor.expectSize(AbstractProcessor.java:52)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:79)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:91)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.tracing.ConfigurationResultWriter.traceEntry(ConfigurationResultWriter.java:53)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.tracing.core.Tracer.traceCall(Tracer.java:126)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:192)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:181)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleResourceRegistration(BreakpointInterceptor.java:615)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.findResource(BreakpointInterceptor.java:628)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1206)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.headers.JNIFunctionPointerTypes$GetMethodIDFunctionPointer.invoke(JNIFunctionPointerTypes.jav
a)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.resolveBreakpointMethod(BreakpointInterceptor.java:1539)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.installBreakpointIfClassLoader(BreakpointInterceptor.java:1274)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onClassPrepare(BreakpointInterceptor.java:1266)
oubidar-Abderrahim
changed the title
Collect Metadata with the Tracing Agent
[Tracing Agent][GR-64510] Collect Metadata with the Tracing Agent
Apr 23, 2025
Describe the Issue
I am currently using any plugin to package Maven projects into JAR files. My project is a JavaFX project with CSS and FXML. When executing - agentlib: native image agent, it will start my project, but clicking on the above operation will result in an error and the final generated native image is incomplete.
demo.zip
The collected questions have been screenshot and the relevant demo project has been uploaded
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
(base) PS C:\Users\16973\IdeaProjects\demo\target> java -agentlib:native-image-agent=config-merge-dir=native-image -jar .\demo-1.0-SNAPSHOT.jar
4月 21, 2025 10:15:04 上午 com.sun.javafx.application.PlatformImpl startup
警告: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @42dd317f'
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.sun.glass.utils.NativeLibLoader in an unnamed module (file:/C:/Users/16973/IdeaProjects/demo/target/depen
dencies/javafx-graphics-17.0.6-win.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::allocateMemory has been called by com.sun.marlin.OffHeapArray (file:/C:/Users/16973/IdeaProjects/demo/target/dependencies/javafx-graph
ics-17.0.6-win.jar)
WARNING: Please consider reporting this to the maintainers of class com.sun.marlin.OffHeapArray
WARNING: sun.misc.Unsafe::allocateMemory will be removed in a future release
Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,findResourceAsStream),(caller_class,java.lang.Module),(result,true),(args,[com/sun
/javafx/reflect/Trampoline.class])}): java.lang.IllegalArgumentException: List must have exactly 2 element(s)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.AbstractProcessor.expectSize(AbstractProcessor.java:52)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:79)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:91)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.tracing.ConfigurationResultWriter.traceEntry(ConfigurationResultWriter.java:53)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.tracing.core.Tracer.traceCall(Tracer.java:126)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:192)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:181)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleResourceRegistration(BreakpointInterceptor.java:615)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.findResource(BreakpointInterceptor.java:628)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1206)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.headers.JNIFunctionPointerTypes$GetMethodIDFunctionPointer.invoke(JNIFunctionPointerTypes.jav
a)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.resolveBreakpointMethod(BreakpointInterceptor.java:1539)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.installBreakpointIfClassLoader(BreakpointInterceptor.java:1274)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onClassPrepare(BreakpointInterceptor.java:1266)
Operating System and Version
w10
Build Command
java -agentlib:native-image-agent=config-merge-dir=native-image -jar .\demo-1.0-SNAPSHOT.jar
Expected Behavior
Successfully generated metadata
Actual Behavior
Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,findResourceAsStream),(caller_class,java.lang.Module),(result,true),(args,[com/sun
/javafx/reflect/Trampoline.class])}): java.lang.IllegalArgumentException: List must have exactly 2 element(s)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.AbstractProcessor.expectSize(AbstractProcessor.java:52)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:79)
at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:91)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.tracing.ConfigurationResultWriter.traceEntry(ConfigurationResultWriter.java:53)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.tracing.core.Tracer.traceCall(Tracer.java:126)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:192)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:181)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleResourceRegistration(BreakpointInterceptor.java:615)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.findResource(BreakpointInterceptor.java:628)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1206)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.headers.JNIFunctionPointerTypes$GetMethodIDFunctionPointer.invoke(JNIFunctionPointerTypes.jav
a)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.resolveBreakpointMethod(BreakpointInterceptor.java:1539)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.installBreakpointIfClassLoader(BreakpointInterceptor.java:1274)
at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onClassPrepare(BreakpointInterceptor.java:1266)
Steps to Reproduce
Additional Context
No response
Build Log Output and Error Messages
No response
The text was updated successfully, but these errors were encountered: