This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Error while converting XSD using Jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Error while converting XSD using Jar" Watch "Error while converting XSD using Jar" New topic
Author

Error while converting XSD using Jar

Pooja Sinha
Greenhorn

Joined: Aug 18, 2009
Posts: 11
I'm trying to convert a XSD using Jar and a batch file which sets the classpath and other relevant paramters. I get the Error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/xml/sax/ErrorHandler

The classpath has the following jar files:
  • xercesImpl-1.5.jar
  • sax2.jar
  • sax-2.0.1.jar
  • dom.jar
  • dom4j-1.6.1.jar
  • xalan.jar
  • xsdlib.jar
  • jaxb-api.jar
  • jaxb-impl.jar
  • jaxb-libs.jar
  • jaxb-xjc.jar
  • namespace.jar
  • jax-qname.jar
  • relaxngDatatype.jar


  • Although the class org/xml/sax/ErrorHandler exists in the jar sax.jar but still this error comes up.
    Kindly Help
    Paul Clapham
    Bartender

    Joined: Oct 14, 2005
    Posts: 18541
        
        8

    That must be your problem then... you don't have "sax.jar" in your classpath. Not if your classpath is the list of jars you posted, anyway.
    Trilochan Bharadwaj
    Ranch Hand

    Joined: Feb 02, 2009
    Posts: 100
    How's the classpath being set? care to share batch file snippet?

    Trilochan.
    Pooja Sinha
    Greenhorn

    Joined: Aug 18, 2009
    Posts: 11
    Thanks! I was able to resolve the issue. The only problem was the JDK being used. Changed the path to take jdk1.4 and the issue was resolved
     
    Consider Paul's rocket mass heater.
     
    subject: Error while converting XSD using Jar
     
    Similar Threads
    Linkage Error with LOG4j
    Fatal error while parsing xml
    XML to Java object using JAXB
    Creating empty tags using JAXB.
    New Fields in XML