java - extended classes from jar does not work -
i've project in xmlbeans 2.6.0 jars referenced , added classpath. create class similar below:
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() { // below method present in xmlobjectbase extended xmlcomplexcontentimpl // xmlobjectbase , xmlcomplexcontentimpl part of jar generatedsetterhelperimpl(null, null, 0, (short)2); } }
and when create instance of test3 , call hello()
method, error nosuchmethoderror
thrown. not lookup extended class method instead searches method in test3.
java.lang.nosuchmethoderror: com.voxify.vui.action.test3.generatedsetterhelperimpl(lorg/apache/xmlbeans/xmlobject;ljavax/xml/namespace/qname;is)lorg/apache/xmlbeans/xmlobject;
these errors arise jar version conflict. may have different jar version @ compile time , run time.one way check remove jar think getting referred to. way might find different version of same jar in classpath getting loaded.
Comments
Post a Comment