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