I am new to Java and XML and I am trying to solve a problem that has bothered for few days. I have downloaded the parser Xerser-1.4.4 and JDK2. I install the JDK first and test it, it works. Then I install the parser, using this command right under the C drive. I set the CLASSPATH to C:\xerces-1_4_4\\xerces.jar;C:\xerces-1_4_4\xercesSamples.jar; and I type the command “cd C:\xerces-1_4_4”. This brings me to the directory. Then I issue the command “java sax.saxcount data/personal.xml –v” I get the following error: Exception in thread “main” java.lang,NoClassDefFoundError: sax/saxcount Same behavior for DomCount. I am very sure I have defined the classpath for the parser and my java is working. I do not understand where does the sax.saxcount come from? I have already consult few FAQs but found no solution on this problem. Can you help me ? Thanks
Not sure why this thread is in this forum - I think theres an XML forum, but since I just installed xerces I thought I'd try it. First I got the same error as you, then I looked in XercesSamples.jar (you can use winzip to check this yourself) to see what classes were there and noticed that its "SAXCount", so "java sax.SAXCount c:\general\veg.xml -v" works. I then noticed that Joel has already pointed this out. When you say you've tried all combinations of upper case and lower case I somehow doubt it,are you sure that you've tried "SAXCount" ?