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.

Popular posts from this blog

Slow, Buffering, Stuttering Udemy Video

Intellij tip - Joining multiple lines into one

Looking for IT work in Australia? JobReel.com.au!