-
Notifications
You must be signed in to change notification settings - Fork 41.2k
HibernateException when compiling to native image #38898
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
Comments
Hibernate appears to be misconfigured but we cannot tell why that is the case as you have not shared any information about how you're using it. If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
This is no configuration problem. The property hibernate.bytecode.use_reflection_optimize was simply removed |
We have a smoke test for JPA in a native image that passes so we're as confident as we can be that this is, in fact, a configuration problem. If you have evidence to the contrary, please share it with us in the form a minimal sample that reproduces your problem and we'll happily take a look at it. |
Thank you for your answer. My project does not run in a native image, but on jvm. To reproduce you only have to set hibernate.bytecode.provider=none and start any small jpa project in the jvm. Maybe I am using the wrong configuration property to disable the reflection optimizer? I only know of hibernate.bytecode.use_reflection_optimizer=false, wich does not work any more. If there is another property to disable it, I would be happy, but I couldn't find one yet, even in the sourcecode. |
Then this issue isn't relevant as it's specifically about a Hibernate's own properties are, largely, out of Spring Boot's control. If you're not sure which Hibernate properties to use to get Hibernate to behave as you require, asking the Hibernate community or maintainers is a better option. |
Ok, I see, wrong ticket. I know, wich hibernate properties to use to disable the bytecode optimizer. But then, the jvm build isn't usable any more in spring boot, see spring-projects/spring-framework#31051 if you wish. |
(https://drive.google.com/file/d/1VhiNjbatpojBah1XOaYRBN8NKWDMkzpw/view?usp=sharing) Have been hitting this issue regularly with SpringBoot 3.4.x Above is complete yet minimal sample that reproduces the problem. 2 sets of command produce similar but not identical errors. Below are the commands to recreate it with Gradle 7.6.4 and Graal Java(TM) SE Runtime Environment Oracle GraalVM 17.0.11+7.1 1. gradle build -x test :microservices:review-service:nativeCompile -Pprofile=instrumented &&
2. gradle build -x test :microservices:review-service:bootBuildImage &&
Any help will be greatly appreciated. |
That looks like a different error to the one reported in this issue. The provided sample also appears to be far from minimal as it includes multiple modules with numerous dependencies that are not related to a Hibernate problem. To investigate your problem, I would start by using an up-to-date version of the |
My bad, shall i make a new issue? |
I'm using:
I'm trying to compile native image, and when I do so, I get this error:
The text was updated successfully, but these errors were encountered: