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

java.lang.ExceptionInInitializerError: null error when using nativeRun #229

Open
devondragon opened this issue Dec 6, 2022 · 5 comments
Assignees
Labels

Comments

@devondragon
Copy link

I am upgrading an app from SpringBoot 2.7 to 3.0 (and JDK 11 to JDK 19). Everything works fine, until I try to run the app as a Native build using GraalVM 19 22.3.0, where I get errors from the LayoutDialect lib. Any suggestions? Thanks!

Stacktrace attached:

stacktrace.txt

@ultraq ultraq added the question label Dec 6, 2022
@ultraq ultraq self-assigned this Dec 6, 2022
@ultraq
Copy link
Owner

ultraq commented Dec 6, 2022

I tried replicating the setup as the stack trace is unfortunately light on what exactly is null and causing things to crash. I haven't tried GraalVM before, so provided I'm following Spring Boot's instructions properly (https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html), I can get a JVM build working just fine but a native build I'm having trouble even getting it to finish! I might try again if I have some spare time later this week, but no I'm not sure why it might be acting like this at the moment 😕

@devondragon
Copy link
Author

No problem, thank you for looking into it. If you need any help with the native build I will help if I can.

@devondragon
Copy link
Author

This seems to be related to the Groovy code specifically. I tried switching to https://github.com/zhanhb/thymeleaf-layout-dialect as a test, and the error went away. (I still have some application issues with Native I need to address however).

@ultraq
Copy link
Owner

ultraq commented Jan 2, 2023

Thanks for sharing your findings 👍 I haven't had much luck getting this going myself, so if you'd like me to look into it further would you be able to provide a minimal project/repo that replicates the issue? I managed to get a workaround last week for something that feels a bit similar (a Groovy bytecode bug on a very specific configuration, #230) thanks to a test repo, so that might help me here too.

@devondragon
Copy link
Author

Sure, I will try to create a simple test project (although it may not happen until the weekend). Thanks!

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

No branches or pull requests

2 participants