I keep getting this error when migrating to Jersey 2. At fist I though it is some Maven issue but it does not looks like that. I keep getting: AnnotatedClassVisitor has interface jersey.repackaged.org.objectweb.asm.ClassVisitor as super class
my Maven look like that:
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.15</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>2.15</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.15</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jdk-http</artifactId>
<version>2.15</version>
</dependency>
Any idea will be helpfull
You probably have Jersey 1.x Server module on your class-path. This module (before version 1.19) contains repackaged ASM 3 where ClassVisitor
is still an interface. Remove the 1.x dependencies from your code and should be fine.
Note: Jersey 2.x Server module also contains repackaged ASM. But the repackaged ASM is newer, version 5, and ClassVisitor
there is already an abstract class.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.