-
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 fails with Exception java.lang.ExceptionInInitializerError while using Jasper Report #2696
Comments
Update: Able to proceed further by using the tracing agent to generate the configuration files and specifying these configuration files during native image build. However now stuck with the below error while running the native executable.
Tried to load the library libfontmanager.so using NativeLibrarySupport.singleton().loadLibrary() but to no avail. Updated the reproducer project below with the JNI and reflection configuration files. |
I found that similar problems happens in Micronaut Redis and spring-graalvm-native. Perhaps we can refer to these issues and their fix micronaut-core#3713, micronaut-core#48, spring-graalvm-native#163,spring-graalvm-native#185 to find more context about the bug (e.g. the version Information and the commnad). Also the similar problem is mentioned in helidon#1941 |
I'm having a similar issue while compiling a Jasper Reports based application in windows: Native-tools options: native-image -H:+ReportExceptionStackTraces -H:-CheckToolchain --no-fallback
Describe GraalVM and your environment:
|
You need to copy |
Thanks for your answer, pquiring. I'm currently fixing another problem I'm having with jasper and as soon as I can I'll try copying them. |
It might be |
I looking to use Jasper Report in Quarkus native, but I can't found the solution. Is there any update about this bug? |
Seems significant improvements in AWT/Swing support have occurred since the OP reported this issue in the 20.1 version. In GraalVM 22.0.0.2 version, the reproducer project above works fine for me. To test it, I've forked the OP's reproducer project, and updated extensively its pom.xml so that Maven alone can be used to build the native image. The fork is here. To produce the native image:
(the Then to run the generated native image, e.g. in Linux:
or in Windows:
and the report file CarReport.pdf is properly created in the current directory by the native image's execution. |
@chirontt thanks for verifying that it works now. |
Describe the issue
Native build fails with error while generating report using Jasper reports library. Works fine in JVM mode and report gets generated.
Note: Added --initialize-at-build-time=org.eclipse.jdt.internal.compiler.parser.Parser,org.eclipse.jdt.internal.compiler.util.Util and able to generate the native image.
But running the native image fails with the below exception
Steps to reproduce the issue
Reproducer project available at https://github.com/MahaswamiSoftware/native-jasper-report
Describe GraalVM and your environment:
The text was updated successfully, but these errors were encountered: