mardi 30 septembre 2014

IncompatibleClassChangeError:org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface *.asm.ClassVisitor as super class


Vote count:

0




I am using Spring 4.1 and writing maven modules from scratch. I have 2 service modules A and B and a webapp which makes calls to service A whose implementation is there in module B. Following is the list of Spring jars in my parent pom.



<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>


I got few more issues before encountering this which i resolved. So one of the posts asked to put the below dependencies as well (I dont understand why i have to provide it if spring needed them why its not packaged with it).



<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspect.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspect.version}</version>
<scope>provided</scope>
</dependency>


I got the mentioned issue and one of the posts suggests to exclude the spring-asm which is old and include latest asm-all dependency.



<dependency>
<groupId>asm</groupId>
<artifactId>asm-all</artifactId>
<version>3.3.1</version>
</dependency>


I removed spring-asm dependency add the above. Now i run into the issue where the classes are not compatible. Kindly suggest how can i resolve it.


Thanks in advance



asked 36 secs ago







IncompatibleClassChangeError:org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface *.asm.ClassVisitor as super class

Aucun commentaire:

Enregistrer un commentaire