Closed fragaLY closed 2 years ago
I don't see funky stuff in your application which could lead to a failure. But you have com.vladmihalcea:hibernate-types-55:2.16.3
in your application. Spring Native doesn't have support for that library yet. Just adding it to the classpath messes with Hibernate in a way which breaks the native image.
Hopefully we can fix this with Spring Boot 3.
Hm...
@vladmihalcea, could you probably suggest any solution?
I've decided not to invent the wheel and removed com.vladmihalcea:hibernate-types-55:2.16.3
from dependencies.
As a result, I have a fully working solution.
Yeah, well, I built my own theme park, with blackjack and spring native.
The example is here: https://github.com/fragaLY/performance-researches/tree/master/spring-boot-web-native
The result of performance compared with the default web implementation: https://github.com/fragaLY/performance-researches/tree/master/spring-boot-web I could provide later. For sure, if you will need it.
FYI: @mhalbritter
@fragaLY Hibernate Types does not provide support for native environments. It's unlikely that it will work as it hadn't worked on Quarkus with GraalVM
https://github.com/vladmihalcea/hibernate-types/issues/202
If anyone wants to make it work for native environments, feel free to provide a Pull Request.
@vladmihalcea , I have a workaround at the moment. So, if I will have free time I could contribute. And thank you for a quick response. And for your job. Happy Friday!
All the best!
@mhalbritter Hi. I have the same problems without using hibernate-types. Here is my pom https://gist.github.com/ducanh2110/246f783c71a3660aa60b5af4be068d80 Please help me know where is the problem. Thanks so much
@ducanh2110 If you want some help, please create a dedicated issue with a full repro. Since we are focusing on Spring Boot 3 native support, I advise you to test with Spring Boot 3 M5 which has just been released, since on Spring Native side we will only fix critical issues.
@sdeleuze thanks for support. I will try spring boot 3
Hello, pioneers,
I would like to find a way of solving the problem regarding the entity manager initialization.
The sample of the project is here: https://github.com/fragaLY/performance-researches/tree/master/spring-boot-web-native
docker-compose up
in the /docker directory to boot up the database../gradlew nativeCompile
The actual result is:
In spite of this,
./gradlew bootRun
works perfectly.