OpenPojo IncompatibleClassChangeError 异常
OpenPojo IncompatibleClassChangeError Exception
我正在使用 OpenPojo
来验证 class 的 getter 和 setter 方法。
但是在尝试验证我的 getter 和 setter 方法时,我遇到了以下异常:
java.lang.IncompatibleClassChangeError: class com.openpojo.reflection.java.bytecode.asm.SubClassCreator has
interface org.objectweb.asm.ClassVisitor as super class
这是我的代码:
public final class ClientToken implements RememberMeAuthenticationToken {
private static final long serialVersionUID = 3141878022445836151L;
private final String clientName;
private final Credentials credentials;
private String userId;
private boolean isRememberMe;
public ClientToken(final String clientName, final Credentials credentials) {
this.clientName = clientName;
this.credentials = credentials;
}
public void setUserId(final String userId) {
this.userId = userId;
}
public void setRememberMe(boolean isRememberMe) {
this.isRememberMe = isRememberMe;
}
public String getClientName() {
return this.clientName;
}
public Object getCredentials() {
return this.credentials;
}
public Object getPrincipal() {
return this.userId;
}
@Override
public String toString() {
return CommonHelper.toString(ClientToken.class, "clientName", this.clientName, "credentials", this.credentials,
"userId", this.userId);
}
public boolean isRememberMe() {
return isRememberMe;
}
}
有谁能帮我看看为什么会出现这个问题。
您是否尝试过将 ASM 5.0.3 或更高版本添加为依赖项?
似乎要引入 ASM 的旧版本。
我正在使用 OpenPojo
来验证 class 的 getter 和 setter 方法。
但是在尝试验证我的 getter 和 setter 方法时,我遇到了以下异常:
java.lang.IncompatibleClassChangeError: class com.openpojo.reflection.java.bytecode.asm.SubClassCreator has interface org.objectweb.asm.ClassVisitor as super class
这是我的代码:
public final class ClientToken implements RememberMeAuthenticationToken {
private static final long serialVersionUID = 3141878022445836151L;
private final String clientName;
private final Credentials credentials;
private String userId;
private boolean isRememberMe;
public ClientToken(final String clientName, final Credentials credentials) {
this.clientName = clientName;
this.credentials = credentials;
}
public void setUserId(final String userId) {
this.userId = userId;
}
public void setRememberMe(boolean isRememberMe) {
this.isRememberMe = isRememberMe;
}
public String getClientName() {
return this.clientName;
}
public Object getCredentials() {
return this.credentials;
}
public Object getPrincipal() {
return this.userId;
}
@Override
public String toString() {
return CommonHelper.toString(ClientToken.class, "clientName", this.clientName, "credentials", this.credentials,
"userId", this.userId);
}
public boolean isRememberMe() {
return isRememberMe;
}
}
有谁能帮我看看为什么会出现这个问题。
您是否尝试过将 ASM 5.0.3 或更高版本添加为依赖项? 似乎要引入 ASM 的旧版本。