• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error while converting XSD using Jar

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
     
    Marshal
    Posts: 28193
    95
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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.
     
    Ranch Hand
    Posts: 100
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    How's the classpath being set? care to share batch file snippet?

    Trilochan.
     
    Pooja Sinha
    Greenhorn
    Posts: 11
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic