[ https://issues.apache.org/jira/browse/XERCESJ-493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Elliotte Rusty Harold resolved XERCESJ-493. ------------------------------------------- Resolution: Invalid Java 1.3 no longer supported > Xerces 2.2.0 - 1.4.4 incompatibility > ------------------------------------ > > Key: XERCESJ-493 > URL: https://issues.apache.org/jira/browse/XERCESJ-493 > Project: Xerces2-J > Issue Type: Bug > Components: DOM (Level 3 Core) > Affects Versions: 2.2.0 > Environment: Operating System: Windows XP > Platform: PC > Reporter: Arpad Zoldi > > My webapp, works fine with Tomcat 4.0.4, but it fails with Tomcat 4.1.12, with > this exception: > java.lang.NoClassDefFoundError: org/apache/xerces/framework/XMLParser > In the code DOMParser is used and is built the xerces.jar(1.4.4 I think). > When I > replaced the Xerces jars (xercesImpl.jar and xmlParserAPIs.jar) that come with > Tomcat 4.1.12, found in common/endorsed dir with xerces.jar, it works fine. > After some investigation, I extracted the relevant code and constructed a > simple > test case. > <code> > import java.io.InputStream; > import org.w3c.dom.Document; > import org.xml.sax.InputSource; > import org.xml.sax.SAXException; > import org.apache.xerces.parsers.DOMParser; > public class XercesBug { > > public static void main( String[] args ) { > try { > System.out.println( "Creating parser..." ); > DOMParser parser = new DOMParser(); > System.out.println( "Parser created." ); > System.out.println( "Calling parse..." ); > String file = "d:\\some.xml"; > parser.parse( new InputSource( new java.io.FileInputStream( file > ) ) ); > System.out.println( "Done." ); > } catch( Exception e ) { > e.printStackTrace( System.out ); > } > } > } > </code> > I compiled the code above with jdk 1.3.1_03 and classpath contains the old > xerces.jar. > When run (I tried both jdk1.3.1_03 and jdk 1.4.0_01) with the Xerces 2.2.0 > jars > (xercesImpl.jar, xmlParserAPIs.jar)in the classpath, it fails with the error I > mentioned above. > However, when compiled with jdk 1.4.0_01, it does not fail (I run again with > both jdk 1.3.1_03 and 1.4.0_01 and classpath contains xercesImpl.jar and > xmlParserAPIs.jar). > It seems to be related somehow with the Java 1.4, may be Xerces 2.2.0 was > built > with jdk 1.4. > Cheers, > Arpi -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: j-dev-h...@xerces.apache.org