I\'m using maven_spring 3.1.M2 + hibernate 3.5. Once I put the line
in my applicationcontex xml file, the follwoing error will oc
I had the same issue, And solution is the Spring jars Now it depends on person to person which spring jar his project is using and actually which one is missing. For me it happened 3-4 times when I created project. Sometime I had all Spring jar but not the Spring.jar Next time Spring Aspect jar was missing. while some other time I had make sure of all but missed security. But I always fixed it by carefully placing the Spring jars. No need to look for any other reason.
Hope that help and focus on only Spring jars and not others. Happy Coding guys!!
I faced this issue when using both jersey-spring3
and spring-core
.
The jersey-spring3.jar, uses its own version for Spring libraries, so to use the ones you want, you need to exclude these libraries manually.
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-spring3</artifactId>
<version>2.22.1</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>
<artifactId>bean-validator</artifactId>
<groupId>org.glassfish.hk2.external</groupId>
</exclusion>
</exclusions>
</dependency>
Do you have AspectJ in your pom.xml or in your lib-directory?
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>3.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
I had the same error and this solved my problem.
resolve conflict version the spring dependencies in pom.xml
, may be in various version change class name or add feature that in other dependencies has incompatibility.