I am developing a Java web project using the latest Spring framework version (3.2.2-RELEASE), but now I have a problem when the project is started up. The detail error is
Same issue for me. I ran 'mvn dependency:tree' and noticed that an older version of spring-aop was being brought in so I added it to the jersey-spring exclusions, which corrected my problem:
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-spring</artifactId>
<version>${jersey.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>
I ran into the same problem when trying to add Spring security to the application. The problem was resolved by adding
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.2.2.RELEASE</version>
</dependency>
I solved my same problem after I generated a mvn dependency:tree and looked for older spring versions in my tree. Indeed, there was a dependency to org.springframework:spring-asm:3.0.7-RELEASE in my dependencies.
I resolved the problem adding following exclusion in jersey-spring dependency.
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
I resolved the same problem by reordering the pom dependencies.
I got issue from org.springframework.security. So I brought it to end of the dependencies.
If you are using a spring version > 3.2.0, you no longer need to include specifically spring-asm since it has been included in spring-core.
Remove spring-asm from your build definition and ensure that spring-core is there.
See http://docs.spring.io/spring-framework/docs/3.2.16.RELEASE/spring-framework-reference/htmlsingle/#migration-3.2-inline-asm