classpath or another question.

Discussion in 'Java' started by yangqiao, Jul 15, 2004.

  1. yangqiao

    yangqiao Guest

    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?
     
    yangqiao, Jul 15, 2004
    #1
    1. Advertising

  2. yangqiao

    Micha Guest

    "yangqiao" <> wrote in message
    news:...
    > [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.............
     
    Micha, Jul 15, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ed Thompson

    production classpath question

    Ed Thompson, Oct 30, 2003, in forum: Java
    Replies:
    1
    Views:
    332
    Christophe Vanfleteren
    Oct 30, 2003
  2. Flip
    Replies:
    3
    Views:
    7,415
    Tony Morris
    Feb 9, 2004
  3. Gabe
    Replies:
    3
    Views:
    1,120
  4. Replies:
    2
    Views:
    810
  5. Replies:
    2
    Views:
    1,161
    Mike Schilling
    Mar 2, 2008
Loading...

Share This Page