I have this error
How to fix it?
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 57
I have such POM
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
</parent>
<properties>
<java.version>13</java.version>
</properties>
Project has many literals, so Java 13 is required.
Changing Spring boot version in the pom.xml solved this issue for me.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
The 2.2.0 version of spring-boot hasn't been released yet, but there is a milestone build (M4). If you want to use it, you need to add another maven repository to your pom.xml file:
<repositories>
<repository>
<id>repository.spring.milestone</id>
<name>Spring Milestone Repository</name>
<url>http://repo.spring.io/milestone</url>
</repository>
</repositories>
You can then depend on the milestone build:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.0.M4</version>
</parent>
See also: https://www.baeldung.com/spring-maven-repository
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With