Open alvessteve opened 1 year ago
seems related to this: https://github.com/spring-projects/spring-boot/issues/32659
Running into this after upgrading to Spring Boot 3.0.6 today, on a previously working native image app.
Will try to get a reproducer project together soon.
Edit: Just realized this isn't a Spring repo LOL.
There was a set of new hints added to the GraalVM reachibility metadata repository for Hibernate Core. This new set of hints appears to be missing hints that the previous version's set had.
So far I've had to add these hints (currently adding via code):
hints.reflection()
.registerType(NoJtaPlatform.class, INTROSPECT_PUBLIC_METHODS)
.registerConstructor(NoJtaPlatform.class.getConstructor(), INVOKE)
.registerConstructor(SpringImplicitNamingStrategy.class.getConstructor(), INVOKE)
.registerConstructor(CamelCaseToUnderscoresNamingStrategy.class.getConstructor(), INVOKE);
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<configuration>
<metadataRepository>
<dependencies>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<metadataVersion>6.1.1.Final</metadataVersion>
</dependency>
</dependencies>
</metadataRepository>
</configuration>
</plugin>
This fixed it for me. (I'm using Maven, not Gradle)
Thank you very much for the hints ! will try these
I also started experiencing the same issue in one of my repositories after upgrading GraalVM Build tools native plugin (org.graalvm.buildtools.native
) from 0.9.20
to 0.9.21
.
Downgrading again to 0.9.20
worked fine again (using Gradle).
Error:
java.lang.illegalstateexception: no available jtaplatform candidates amongst [org.hibernate.engine.transaction.jta.platform.internal.nojtaplatform, org.hibernate.service.jta.platform.internal.nojtaplatform]