classpath or another question.

Y

yangqiao

i have a java file as following:

import org.cyberneko.html.parsers.DOMParser;
........
org.cyberneko.html.parsers.DOMParser parser = new
org.cyberneko.html.parsers.DOMParser();
parser.parse(this.tdcFile.toString());
htmlprocess(parser.getDocument(),"");
........

i have lay relative jar into classpath.
it runs wrongly as following:
[1]java.lang.NoSuchMethodError:
org.apache.xerces.parsers.DOMParser.<init>(Lorg/
apache/xerces/xni/parser/XMLParserConfiguration;)V
at org.cyberneko.html.parsers.DOMParser.<init>(Unknown Source)
.....

in file, i use class "org.cyberneko.html.parsers.DOMParser", why the
wrong is:java.lang.NoSuchMethodError:
org.apache.xerces.parsers.DOMParser.
but i don't use org.apache.xerces.parsers.DOMParser in my file.
maybe the reason is that: there are the old jar in classpath.
how can i do?
 
M

Micha

yangqiao said:
[1]java.lang.NoSuchMethodError:
org.apache.xerces.parsers.DOMParser.<init>(Lorg/
apache/xerces/xni/parser/XMLParserConfiguration;)V
at org.cyberneko.html.parsers.DOMParser.<init>(Unknown Source)

Its not your program that references the org.apache.xerces.parsers.DOMParser
but the org.cyberneko.html.parser.DOMParser does.
Thats why the stacktrace says: at org.cybernede.............
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top