Closed ivangfr closed 4 years ago
Hello,
I encounter similar issues with HSQLDB.
You may follow what have been done in the petclinic-jpa sample, and this blog post Spring Tips: Spring and GraalVM (pt. 2).
First, remove bytebuddy from your dependencies, see maven pom.xml. And add an hibernate.properties file with the following property: hibernate.bytecode.provider=none
So now, nothing will be generated at startup time. To allow hibernate to work correctly, you will have to generate required artifacts at build time. For this in maven, one can use the hibernate-enhance-maven-plugin.
These steps should help you. Then you may have to add some classes in reflect-config.json if they are not correctly detected.
Regards
Hi @Query-Interface , thanks for the tips. I've followed the examples and I was able to build and run the docker image of my app.
Here are my changes (https://github.com/ivangfr/graalvm-quarkus-micronaut-springboot/commit/b88a0d59647a81f733e7dc4494dd11e12b7cf247) in case someone faces the same issue.
Hi guys! I am trying to build a native docker image for a
JPA/Hibernate
application. The build succeeds but there is an exception when I run it.The app is called
book-api
. It's a simplespring-boot
application that uses basically dependencies likeactuator
,data-jpa
,validation
,webflux
,lombok
andmapstruct
.MySQL
is used as storage.I am using
spring-boot
version2.4.0-M3
andspring-graalvm-native
version0.8.1
. Besides, I've followed what is described in thespring-graalvm-native
documentation https://repo.spring.io/milestone/org/springframework/experimental/spring-graalvm-native-docs/0.8.1/spring-graalvm-native-docs-0.8.1.zip!/reference/index.htmlHere is the project link https://github.com/ivangfr/graalvm-quarkus-micronaut-springboot/tree/master/book-api/springboot-book-api
The exception I am getting is this one
Any idea what I should do? Thanks!