I am getting this error when I try to start the Spring Boot Application:
java: cannot access org.springframework.boot.SpringApplication bad class file: /repository/org/springframework/boot/spring-boot/3.0.1/spring-boot-3.0.1.jar!/org/springframework/boot/SpringApplication.class class file has wrong version 61.0, should be 55.0 Please remove or make sure it appears in the correct subdirectory of the classpath.
I had a look at the below SO question and it looks like this error happens when the Spring Boot version is 3.0.1. But I dont have that version mentioned in the build.gradle file.
java: cannot access org.springframework.boot.SpringApplication bad class file
here is the build.gradle file portion:
springCloudVersion = '2021.0.3'
springBootPluginVersion = '2.7.6'
sonarQubePluginVersion = '3.3'
gatlingPluginVersion = '3.8.4'
nebulaPublishingPluginVersion = '18.4.0'
nebulaReleasePluginVersion = '16.0.0'
jasyptSpringBootStarterVersion = '3.0.4'
Using Java 11.
I can also see that every time I build the project in IntelliJ, a spring boot 3.0.1 jar and its folder are created under the repository mentioned above ( even if I delete it). I can't see where is that version coming from. Any pointers will be greatly appreciated.