[jdom-interest] NoSuchMethodError: org.w3c.dom.DocumentType
Tad Shimada
tshimad4 at visteon.com
Tue Jan 30 17:28:54 PST 2001
Jason,
Thanks! It works now. I think when I was playing around with Tomcat in the past, I must've
copied parser.jar and jaxp.jar into the standard extension directory and forgotten about it.
Thanks again.
- Tad
Jason Hunter wrote:
> Look in your standard extensions directory and I'll bet you find a DOM1
> implementation. (See the FAQ for details on why such a thing would
> cause this error.)
>
> -jh-
>
> Tad Shimada wrote:
> >
> > Hello,
> >
> > I have a very innocent looking code like this one. All I want to do is
> > to print out the contents of my xml file.
> >
> > import java.io.* ;
> > import org.jdom.* ;
> > import org.jdom.input.DOMBuilder ;
> > import org.jdom.output.XMLOutputter ;
> >
> > public class DOMBuilderTest
> > {
> > public static void main( String[] args ) {
> > try {
> > DOMBuilder builder = new DOMBuilder() ;
> > Document doc = builder.build( new File( "../linux.xml") ) ;
> > XMLOutputter o = new XMLOutputter() ;
> > o.output( doc, System.out ) ;
> > }
> > catch( IOException e ) {
> > e.printStackTrace() ;
> > }
> > catch( JDOMException e ) {
> > e.printStackTrace() ;
> > }
> > }
> > }
> >
> > After compiling this code, when I tried to run it, it gave me a
> > run-time exception that reads as follows.
> >
> > Exception in thread "main" java.lang.NoSuchMethodError:
> > org.w3c.dom.DocumentType: method
> > getPublicId()Ljava/lang/String; not found
> > at org.jdom.input.DOMBuilder.buildTree(DOMBuilder.java,
> > Compiled Code)
> > at org.jdom.input.DOMBuilder.buildTree(DOMBuilder.java,
> > Compiled Code)
> > at org.jdom.input.DOMBuilder.build(DOMBuilder.java, Compiled
> > Code)
> > at org.jdom.input.DOMBuilder.build(DOMBuilder.java, Compiled
> > Code)
> > at JDOMTest.domDocument(JDOMTest.java, Compiled Code)
> > at JDOMTest.main(JDOMTest.java, Compiled Code)
> >
> > I have set my CLASSPATH like this.
> >
> > /my_home/jdom/build/jdom.jar:/my_home/xerces/xerces.jar:\
> > /opt2/oraclient/sqlj/lib/translator.zip:/opt2/oraclient/jdbc/lib/classes12.zip:\
> >
> > /opt2/oraclient/jdbc/charset12.zip:/opt2/j2sdkee1.2.1/lib/j2ee.jar:\
> > /opt2/jdk1.2.2/lib/tools.jar:/opt2/jdk1.2.2/lib/dt.jar:/home/tad:/opt2/tomcat/classes:.
> >
> >
> >
> > As for jdom.jar, I am using beta5. Also tried beta4. As for
> > xerces.jar, I tried with 1.2.3, 1.2.1 and the version that came with
> > jdom download. They all resulted
> > in the same result.
> >
> > Any help will be very much appreciated.
> >
> > Thanks,
> > Tad
> >
> >
--
Tad Shimada Email: tshimad4 at visteon.com
Visteon Technologies LLC Tel: (408) 541-9075 x236
Navigation & Technologies Development Fax: (408) 541-9701
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20010130/05249b02/attachment.htm
More information about the jdom-interest
mailing list