Reputation: 2235
Recently upgraded a large project from Java 11 to 13. I am using AspectJ for logging purposes and I am now getting this error on startup :
AspectJ Internal Error: unable to add stackmap attributes. Unsupported class file major version 57
Looks clear as day that Java 13 is not supported and looking at the AspectJ site they mention Java 12 support added in version 1.9.3 but as of the latest one, 1.9.4, still no mention of Java 13 support.
Any idea if there is a way around this or if the project will be updated again soon? The last release was in May...
UPDATE
As requested, here are my dependency declarations :
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-instrument</artifactId>
</dependency>
And here are my Java Agent declarations :
-javaagent:lib/aspectjweaver-1.9.4.jar -javaagent:lib/spring-instrument-5.2.0.RELEASE.jar
Thanks
Upvotes: 5
Views: 4838
Reputation: 2235
AspectJ 1.9.5 just dropped with official Java 13 support. Spring Boot 2.2.1 still has the 1.9.4 dependency (will probably be updated in 2.2.2) so for now you have to specify an override version in the POM.xml file :
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.9.5</version><!--$NO-MVN-MAN-VER$-->
</dependency>
Upvotes: 4