Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javax libraries  RSS feed

 
Dan Kottas
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sending a message to a SOAP server and trying to parse the reply, but every time I try to do it I get an "Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/parsers/DocumentBuilder"

I'm using j2sdk1.4.2_04 and I've tried adding the environment variable CLASSPATH C:\j2sdk1.4.2_04\jre\lib with jaxp.jar in that folder, but still no luck.

I suppose this is a simple problem...

import javax.xml.parsers.*;
.
.
.
DocumentBuilderbuilder=DocumentBuilderFactory.newInstance().newDocumentBuilder();

thanks,
-Ash
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's strange. Java 1.4 ships with JAXP, so you shouldn't have to include it. But it's a NoClassDefFoundError, not a ClassNotFoundException ... make sure that the jar isn't corrupted.
 
Dan Kottas
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I reinstalled java and it still doesn't work. I even tried commenting the import line. No luck.

Exactly which folder should I find the jaxp jar file in?
 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might have more luck with this in the XML and Related Technologies forum.


-Tim
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!