0
我有一个项目,其中xmlbeans 2.6.0罐子被引用并添加到类路径。我创建一个类似于下面的类:从jar扩展类不起作用
import org.apache.xmlbeans.SchemaType;
import org.apache.xmlbeans.impl.values.XmlComplexContentImpl;
import org.apache.xmlbeans.impl.values.XmlObjectBase;
public class Test3 extends XmlComplexContentImpl {
public Test3(SchemaType type) {
super(type);
}
public void hello() {
// The below method is present in XmlObjectBase which is extended by XmlComplexContentImpl
// XmlObjectBase and XmlComplexContentImpl are part of jar
generatedSetterHelperImpl(null, null, 0, (short)2);
}
}
当我创建Test3的一个实例,并调用hello()
方法,错误NoSuchMethodError
被抛出。它基本上不查找该方法的扩展类,而是在Test3中搜索该方法。
java.lang.NoSuchMethodError: com.voxify.vui.action.Test3.generatedSetterHelperImpl(Lorg/apache/xmlbeans/XmlObject;Ljavax/xml/namespace/QName;IS)Lorg/apache/xmlbeans/XmlObject;
谢谢!这个项目有一些依赖项目。而在他们中,xmlbeans罐子存在,但版本相同 – allout 2015-04-01 06:51:06