extended classes from jar does not work
I've a project in which xmlbeans 2.6.0 jars are referenced and are added to the classpath. I create a class similar to the 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() {
// 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);
}
}
And when I create an instance of Test3 and call hello()
method, an error NoSuchMethodError
is thrown. It basically does not lookup the extended class for the method instead searches for the 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;
java jar xmlbeans
add a comment |
I've a project in which xmlbeans 2.6.0 jars are referenced and are added to the classpath. I create a class similar to the 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() {
// 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);
}
}
And when I create an instance of Test3 and call hello()
method, an error NoSuchMethodError
is thrown. It basically does not lookup the extended class for the method instead searches for the 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;
java jar xmlbeans
add a comment |
I've a project in which xmlbeans 2.6.0 jars are referenced and are added to the classpath. I create a class similar to the 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() {
// 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);
}
}
And when I create an instance of Test3 and call hello()
method, an error NoSuchMethodError
is thrown. It basically does not lookup the extended class for the method instead searches for the 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;
java jar xmlbeans
I've a project in which xmlbeans 2.6.0 jars are referenced and are added to the classpath. I create a class similar to the 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() {
// 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);
}
}
And when I create an instance of Test3 and call hello()
method, an error NoSuchMethodError
is thrown. It basically does not lookup the extended class for the method instead searches for the 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;
java jar xmlbeans
java jar xmlbeans
edited Apr 1 '15 at 4:22
candlejack
73221439
73221439
asked Apr 1 '15 at 4:17
alloutallout
235
235
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
These errors generally arise from jar version conflict. You may have different jar version at compile time and run time.One way to quickly check that is to remove the jar where you think it is getting referred to. That way you might find the different version of the same jar in classpath which is actually getting loaded.
Thanks! There are dependent projects for this project. And in the them, xmlbeans jars are present but with the same version
– allout
Apr 1 '15 at 6:51
add a comment |
In my case I had two version of the same jar, xmlbeans-2.6.0 and xmlbeans-2.3.0 in my application path. Once I remove the oldest, the program runs.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29382772%2fextended-classes-from-jar-does-not-work%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
These errors generally arise from jar version conflict. You may have different jar version at compile time and run time.One way to quickly check that is to remove the jar where you think it is getting referred to. That way you might find the different version of the same jar in classpath which is actually getting loaded.
Thanks! There are dependent projects for this project. And in the them, xmlbeans jars are present but with the same version
– allout
Apr 1 '15 at 6:51
add a comment |
These errors generally arise from jar version conflict. You may have different jar version at compile time and run time.One way to quickly check that is to remove the jar where you think it is getting referred to. That way you might find the different version of the same jar in classpath which is actually getting loaded.
Thanks! There are dependent projects for this project. And in the them, xmlbeans jars are present but with the same version
– allout
Apr 1 '15 at 6:51
add a comment |
These errors generally arise from jar version conflict. You may have different jar version at compile time and run time.One way to quickly check that is to remove the jar where you think it is getting referred to. That way you might find the different version of the same jar in classpath which is actually getting loaded.
These errors generally arise from jar version conflict. You may have different jar version at compile time and run time.One way to quickly check that is to remove the jar where you think it is getting referred to. That way you might find the different version of the same jar in classpath which is actually getting loaded.
answered Apr 1 '15 at 4:32
YantraguruYantraguru
9012917
9012917
Thanks! There are dependent projects for this project. And in the them, xmlbeans jars are present but with the same version
– allout
Apr 1 '15 at 6:51
add a comment |
Thanks! There are dependent projects for this project. And in the them, xmlbeans jars are present but with the same version
– allout
Apr 1 '15 at 6:51
Thanks! There are dependent projects for this project. And in the them, xmlbeans jars are present but with the same version
– allout
Apr 1 '15 at 6:51
Thanks! There are dependent projects for this project. And in the them, xmlbeans jars are present but with the same version
– allout
Apr 1 '15 at 6:51
add a comment |
In my case I had two version of the same jar, xmlbeans-2.6.0 and xmlbeans-2.3.0 in my application path. Once I remove the oldest, the program runs.
add a comment |
In my case I had two version of the same jar, xmlbeans-2.6.0 and xmlbeans-2.3.0 in my application path. Once I remove the oldest, the program runs.
add a comment |
In my case I had two version of the same jar, xmlbeans-2.6.0 and xmlbeans-2.3.0 in my application path. Once I remove the oldest, the program runs.
In my case I had two version of the same jar, xmlbeans-2.6.0 and xmlbeans-2.3.0 in my application path. Once I remove the oldest, the program runs.
answered Nov 21 '18 at 22:38
JippyJoeJippyJoe
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29382772%2fextended-classes-from-jar-does-not-work%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown