-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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] com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing com.ibm.mq.MQMessage #9830
Comments
Hi @shahbaz-dgtera, Thank you for reaching out to us! Could you please share a reproducer with me? |
Can you use attached jars and my pom file just create a simple quarkus app and test to build it native way Right now I am using old school jar execution which is working fine for me but if i use ./mvnw package -Dnative it ddn't work |
Due to internal policies I'm afraid I can't use the zip file you attached. Could you please create a reproducer and share it with us using a github repo please? |
Here please find code clone it and try to build natively |
Is there any update on it ? |
I have tested the provided reproducer and can confirm the issue you encountered. During my investigation, I removed the dependencies related to IBM MQ, which allowed for successful native image generation. This leads me to believe that the IBM MQ libraries may utilize reflection, which can hinder the native image generation process. To address this issue, I recommend testing with the tracing agent. This tool will help generate the necessary configuration files to accommodate reflection usage in your application. You can find more detailed information about the tracing agent and its usage in the following documentation: GraalVM Tracing Agent Documentation. |
Sorry I don't get you I need those libraries if I remove that dependencies then I know it will work, right now legacy-jar is working fine for me so is it possible to make native build with IBM MQ dependencies. Or if it can work with reflection so please tell me the way for it ? |
It is possible that your application includes components that rely on reflection, which can interfere with the successful generation of a native image. To address this, I recommend using the GraalVM Tracing Agent. This tool generates the necessary configuration files to resolve such issues. Based on your current challenge, I suspect that reflection might be the underlying cause. That’s why I suggested using the tracing agent earlier. For more details, please refer to the link provided in my previous comment. |
Describe the Issue
Running command ./mvnw package -Dnative
[14:06:06,182 WARN [io.net.res.dns.DnsServerAddressStreamProviders] Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS. Check whether you have a dependency on 'io.netty:netty-resolver-dns-native-macos'
Failed generating 'quarkus-app-1.0.0-SNAPSHOT-runner' after 27.5s.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.371 s
[INFO] Finished at: 2024-10-07T14:06:10+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.14.3:build (default) on project quarkus-app: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: io.quarkus.deployment.pkg.steps.NativeImageBuildStep$ImageGenerationFailureException: Image generation failed. Exit code: 1
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:489)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:278)
[ERROR] at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
[ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:1575)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:483)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
sali@MacBook-Air quarkus-dumplog-api % java -version
java version "23" 2024-09-17
Java(TM) SE Runtime Environment Oracle GraalVM 23+37.1 (build 23+37-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 23+37.1 (build 23+37-jvmci-b01, mixed mode, sharing)
Operating System and Version
MacOS
Build Command
./mvnw package -Dnative
Expected Behavior
Build success
Actual Behavior
Build fail
Steps to Reproduce
I am using simple quarkus app where i add ibm mq jars
my pomfile
4.0.0Additional Context
No response
Build Log Output and Error Messages
No response
The text was updated successfully, but these errors were encountered: