Replies: 2 comments 12 replies
-
|
Oh, I also ran into a seemingly unrelated issue with syncing Bazel in IntelliJ where it said Note that my java version for the project as specified in the
In case it wasn't assumed, |
Beta Was this translation helpful? Give feedback.
-
|
Ok, strange. I just added a simple utility that we have used internally for cases like this. https://github.com/salesforce/rules_spring/tree/main/tools/jar_explode Please run the jar_explode.sh script on your springboot application, and then find SpringApplication.class on the filesystem. In helloworld, you will see output like: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there!
I'm getting
ClassNotFoundExceptions forSpringApplicationwhen I do eitherbazel runorjava -jar app.jarfor myspringboottarget. Note that I am using Spring Boot 3 and I have specified theJarLauncherclass as instructed, and I'm pretty sure I have the correct dependencies (though maybe there's some kind of incompatibility among the versions of them). I took a look inside the jar, as well, and see that the jar containingSpringApplicationis present (processed_spring-boot-3.4.4.jar) in/BOOT-INF/lib. I noticed inspringboot.bzlit says that@SpringBootApplicationshould be present in/BOOT-INF/classes, which it is not. This is the only lead I have as to what is going wrong, even though the missing class is not the same as the one in theClassNotFoundException. Do y'all have any advice? Is it possible this is a bug?Beta Was this translation helpful? Give feedback.
All reactions