You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that adding two entries to hibernate.properties file in resources folder: hibernate.bytecode.provider=none hibernate.bytecode.use_reflection_optimizer=false
fix the problem
Actual Behaviour
I got error as shown down below:
Error starting Micronaut server: Bean definition [org.hibernate.SessionFactory] could not be loaded: Error instantiating bean of type [org.hibernate.SessionFactory] Message: No classes have been predefined during the image build to load from bytecodes at runtime. Path Taken: SessionFactoryPerDataSourceFactory.buildHibernateSessionFactoryBuilder(SessionFactoryBuilder sessionFactoryBuilder) --> SessionFactoryPerDataSourceFactory.buildHibernateSessionFactoryBuilder([SessionFactoryBuilder sessionFactoryBuilder])
thanks for that, it helped. I would though, still expect freshly auto-generated code from https://micronaut.io/launch to at least compile if none changes have been applied.
It compiles, just for native compile needs that one change that is documented. Launcher that creates code doesn't know it will need native so I guess it's reasonable that is not configured by default.
Expected Behavior
native run works, application starts
I've noticed that adding two entries to hibernate.properties file in resources folder:
hibernate.bytecode.provider=none hibernate.bytecode.use_reflection_optimizer=false
fix the problem
Actual Behaviour
I got error as shown down below:
Error starting Micronaut server: Bean definition [org.hibernate.SessionFactory] could not be loaded: Error instantiating bean of type [org.hibernate.SessionFactory] Message: No classes have been predefined during the image build to load from bytecodes at runtime. Path Taken: SessionFactoryPerDataSourceFactory.buildHibernateSessionFactoryBuilder(SessionFactoryBuilder sessionFactoryBuilder) --> SessionFactoryPerDataSourceFactory.buildHibernateSessionFactoryBuilder([SessionFactoryBuilder sessionFactoryBuilder])
Steps To Reproduce
Environment Information
MacBook Pro / macOS Ventura 13.5
java --version
openjdk 17.0.5 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 17.0.5+8-jvmci-22.3-b08, mixed mode, sharing)
Example Application
https://micronaut.io/launch?type=DEFAULT&name=demo&package=com.example&javaVersion=JDK_17&lang=JAVA&build=GRADLE&test=JUNIT&features=postgres&features=data-jpa&features=flyway&features=hibernate-jpa&version=4.0.4
Version
4.0.4
The text was updated successfully, but these errors were encountered: