Java springboot packaging error #3553
-
OR-TOOLS runs in the development environment normally,but when I package or install it in the springboot jar,it will show the error: I try all the methods metioned before,but it cannot work |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
This is because Spring Boot does not shade the included jars the same way other builds do, see: There is an issue that describes this with several solutions. Attached what I have used which is different what the issues show as solutions |
Beta Was this translation helpful? Give feedback.
-
The best solution for me was described in this ticket by @C-Otto https://github.com/magneticflux-/ortools-java/issues/5#issuecomment-1075407198 . Just add this to your build file:
|
Beta Was this translation helpful? Give feedback.
This is because Spring Boot does not shade the included jars the same way other builds do, see:
https://docs.spring.io/spring-boot/docs/current/reference/html/executable-jar.html#appendix.executable-jar.nested-jars
There is an issue that describes this with several solutions.
Attached what I have used which is different what the issues show as solutions
SpringBootOrToolsNativeLoader.zip