[英]Jersey 2 AnnotatedClassVisitor has interface jersey.repackaged.org.objectweb.asm.ClassVisitor as super class
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. 迁移到Jersey 2时,我一直收到此错误。首先,我虽然遇到了一些Maven问题,但看起来并非如此。 I keep getting: AnnotatedClassVisitor has interface jersey.repackaged.org.objectweb.asm.ClassVisitor as super class 我不断得到:AnnotatedClassVisitor具有接口jersey.repackaged.org.objectweb.asm.ClassVisitor作为超类
my Maven look like that: 我的Maven看起来像这样:
<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. 您的类路径中可能有Jersey 1.x Server模块。 This module (before version 1.19) contains repackaged ASM 3 where ClassVisitor
is still an interface. 此模块(版本1.19之前)包含重新包装的ASM 3,其中ClassVisitor
仍然是接口。 Remove the 1.x dependencies from your code and should be fine. 从您的代码中删除1.x依赖项,应该没问题。
Note: Jersey 2.x Server module also contains repackaged ASM. 注意:Jersey 2.x服务器模块还包含重新打包的ASM。 But the repackaged ASM is newer, version 5, and ClassVisitor
there is already an abstract class. 但是重新打包的ASM是更新的版本5,并且ClassVisitor
已经存在一个抽象类。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.