Closed gtiwari333 closed 2 years ago
Hi, thanks for the report. This is caused by NativeListener
and is fixed in the upcoming 0.12.1
.
@mhalbritter ,
Could you please share the release date?
Hey @fragaLY, we are currently waiting for GraalVM team to release the new version of the native build tools. We hope it will take place soon, sorry that i can't give you a definitive date.
See https://github.com/spring-projects-experimental/spring-native/milestone/34
Native build tools 0.9.13 have been released, you can expect a Spring Native release soon!
@mhalbritter awesome news! Thank you!
@fragaLY Spring Native 0.12.1 has been released, see more details here.
I'm having the same error but with Spring Boot 3.0.1 on a compiled native image.
2023-01-04 21:37:08.921 ERROR --- [http-nio-0.0.0.0-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : [ID: 70163, Host: 127.0.0.1] Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: jakarta.persistence.PersistenceException: Converting `org.hibernate.HibernateException` to JPA `Pe
rsistenceException` : Generation of HibernateProxy instances at runtime is not allowed when the configured BytecodeProvider is 'none'; your model requires a more advanced BytecodeProvider to be enabled.] with root cause
org.hibernate.HibernateException: Generation of HibernateProxy instances at runtime is not allowed when the configured BytecodeProvider is 'none'; your model requires a more advanced BytecodeProvider to be enabled.
at org.hibernate.bytecode.internal.none.DisallowedProxyFactory.getProxy(DisallowedProxyFactory.java:34)
at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:5001)
at org.hibernate.event.internal.DefaultLoadEventListener.createProxy(DefaultLoadEventListener.java:463)
at org.hibernate.event.internal.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:453)
at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:357)
at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:113)
at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:75)
at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:118)
at org.hibernate.internal.SessionImpl.fireLoadNoChecks(SessionImpl.java:1244)
at org.hibernate.internal.SessionImpl.internalLoad(SessionImpl.java:1097)
at org.hibernate.sql.results.graph.entity.internal.EntityDelayedFetchInitializer.resolveInstance(EntityDelayedFetchInitializer.java:164)
at org.hibernate.sql.results.internal.StandardRowReader.coordinateInitializers(StandardRowReader.java:147)
at org.hibernate.sql.results.internal.StandardRowReader.readRow(StandardRowReader.java:97)
at org.hibernate.sql.results.spi.ListResultsConsumer.consume(ListResultsConsumer.java:198)
at org.hibernate.sql.results.spi.ListResultsConsumer.consume(ListResultsConsumer.java:33)
In that case, you should probably create an issue in https://github.com/spring-projects/spring-framework/issues with a reproducer.
@sdeleuze I did: https://github.com/spring-projects/spring-framework/issues/29779
It's related to lazy loading of entities. That wasn't easy to analyze. Now that I know that I may be able to work around it.
I'm getting this error in my simple JPA application that uses
org.springframework.experimental
dependency when I call JpaRepository.getReferenceById. The error goes away if I comment this dependency.How to Reproduce: Clone and run the DemoApplication class from this repo https://github.com/gtiwari333/spring-native-jpa-getReferenceById-Bug
Full Stack-trace/application log: