Friday, 12 April 2013

AspectJWeaver with JDK 7 - error - only supported at Java 5 compliance level or above



I came across this problem with an older project - when I switched from jdk6 to jdk7, when the application started I encountered:
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException:  error annotation type patterns are only supported at Java 5 compliance level or above
I didn't want a purely maven solution because during development I run the app in Tomcat via the IDE (Intellij IDEA).

In the end I just upgraded my aspectjweaver dependency to 1.7.2 (it was 1.5.4)

<dependency>
   <groupId>org.aspectj</groupId>
   <artifactId>aspectjweaver</artifactId>
   <version>1.7.2</version>
</dependency>
Everything seems okay now.

0 comments:

Post a Comment