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

[Native Image] Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,getSystemResources),(caller_class,com.ibm.msg.client.commonservices.componentmanager.ComponentManager),(result,true),(args,[null])}): java.lang.NullPointerException #9972

Open
2 tasks
NicklasWallgren opened this issue Oct 26, 2024 · 2 comments
Assignees

Comments

@NicklasWallgren
Copy link

NicklasWallgren commented Oct 26, 2024

Describe the Issue

I'm seeing warnings/NPE's when executing a task with the agent attached:

Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,getSystemResources),(caller_class,com.ibm.msg.client.commonservices.componentmanager.ComponentManager),(result,true),(args,[null])}): java.lang.NullPointerException
        at [email protected]/java.util.regex.Pattern.quote(Pattern.java:1499)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:84)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:88)
        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:117)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:188)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:177)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleGetSystemResources(BreakpointInterceptor.java:620)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.getSystemResources(BreakpointInterceptor.java:614)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1091)

Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,getSystemResource),(caller_class,com.ibm.mq.jakarta.jms.MQJMSComponent$1),(result,true),(args,[null])}): java.lang.NullPointerException
        at [email protected]/java.util.regex.Pattern.quote(Pattern.java:1499)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:84)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:88)
        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:117)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:188)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:177)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleGetSystemResources(BreakpointInterceptor.java:620)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.getSystemResource(BreakpointInterceptor.java:610)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1091)

Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,getSystemResources),(caller_class,com.ibm.msg.client.commonservices.CommonServices),(result,true),(args,[null])}): java.lang.NullPointerException
        at [email protected]/java.util.regex.Pattern.quote(Pattern.java:1499)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:84)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:88)
        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:117)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:188)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:177)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleGetSystemResources(BreakpointInterceptor.java:620)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.getSystemResources(BreakpointInterceptor.java:614)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1091)

Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,getSystemResource),(caller_class,com.ibm.mq.jakarta.jms.MQJMSComponent$1),(result,true),(args,[null])}): java.lang.NullPointerException
        at [email protected]/java.util.regex.Pattern.quote(Pattern.java:1499)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:84)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:88)
        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:117)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:188)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:177)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleGetSystemResources(BreakpointInterceptor.java:620)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.getSystemResource(BreakpointInterceptor.java:610)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1091)

Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,getSystemResource),(caller_class,com.ibm.msg.client.commonservices.j2se.propertystore.PropertyStoreImpl),(result,true),(args,[null])}): java.lang.NullPointerException
        at [email protected]/java.util.regex.Pattern.quote(Pattern.java:1499)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:84)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:88)
        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:117)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:188)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:177)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleGetSystemResources(BreakpointInterceptor.java:620)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.getSystemResource(BreakpointInterceptor.java:610)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1091)

Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,getSystemResource),(caller_class,com.ibm.mq.jmqi.internal.JmqiTools$6),(result,true),(args,[null])}): java.lang.NullPointerException
        at [email protected]/java.util.regex.Pattern.quote(Pattern.java:1499)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:84)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:88)
        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:117)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:188)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:177)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleGetSystemResources(BreakpointInterceptor.java:620)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.getSystemResource(BreakpointInterceptor.java:610)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1091)

Warning: Error processing trace entry map(size=5, {(tracer,reflect),(function,getSystemResource),(caller_class,java.lang.ClassLoader),(result,true),(args,[null])}): java.lang.NullPointerException
        at [email protected]/java.util.regex.Pattern.quote(Pattern.java:1499)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.ReflectionProcessor.processEntry(ReflectionProcessor.java:84)
        at org.graalvm.nativeimage.configure/com.oracle.svm.configure.trace.TraceProcessor.processEntry(TraceProcessor.java:88)
        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:117)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceBreakpoint(BreakpointInterceptor.java:188)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.traceReflectBreakpoint(BreakpointInterceptor.java:177)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.handleGetSystemResources(BreakpointInterceptor.java:620)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.getSystemResource(BreakpointInterceptor.java:610)
        at org.graalvm.nativeimage.agent.tracing/com.oracle.svm.agent.BreakpointInterceptor.onBreakpoint(BreakpointInterceptor.java:1091)

Using the latest version of GraalVM can resolve many issues.

GraalVM Version

java 22.0.2 2024-07-16
Java(TM) SE Runtime Environment Oracle GraalVM 22.0.2+9.1 (build 22.0.2+9-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 22.0.2+9.1 (build 22.0.2+9-jvmci-b01, mixed mode, sharing)

Operating System and Version

MacOS 15.0.1 (24A348)

Diagnostic Flag Confirmation

  • I tried the -H:ThrowMissingRegistrationErrors= flag.

Run Command

java -agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image/ -jar target/app.jar

Expected Behavior

The task should run without warnings.

Actual Behavior

NPE

Steps to Reproduce

Essentially, I have a project with a dependency on com.ibm.mq.jakarta.client-9.4.0.0: and the above mentioned warnings are displayed repeatedly when executing.

Additional Context

No response

Run-Time Log Output and Error Messages

No response

@oubidar-Abderrahim
Copy link
Member

Please upgrade your GraalVM to use

java version "23.0.1" 2024-10-15
Java(TM) SE Runtime Environment Oracle GraalVM 23.0.1+11.1 (build 23.0.1+11-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 23.0.1+11.1 (build 23.0.1+11-jvmci-b01, mixed mode, sharing)

then retry.
If the issue is still present after upgrading, please provide a reproducer code for this issue.

@oubidar-Abderrahim oubidar-Abderrahim self-assigned this Oct 28, 2024
@oubidar-Abderrahim
Copy link
Member

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants