[jdom-interest] yet another NoClassDefFoundError

Edelson, Justin Justin.Edelson at mtvn.com
Tue May 30 19:24:16 PDT 2006



From: jdom-interest-bounces at jdom.org on behalf of Tobias Thierer
Sent: Tue 5/30/2006 8:45 PM
To: jdom-interest at jdom.org
Subject: [jdom-interest] yet another NoClassDefFoundError


I have an XML document to parse in the form:


The whole document is too large to hold in memory, so I wanted to get only
one b-element at the time from the parser. I tried to use ElementScanner and
ElementListener from jdom-contrib, but run into a NoClassDefFoundError when
I call

   elementScanner.addElementListener(elementListener, "/a/*");

I also get the error when I try the ElementScannerTest.java example file
(attached) that comes with the jdom-contrib documentation. The error occurs
in line 384 of XPathMatcher.java, where it tries to call


this fails with a NoClassDefFoundError which is then caught and masked, so
in the end I get the following error message:

Exception in thread "main" java.lang.NoClassDefFoundError:
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at ElementScannerTest.main(ElementScannerTest.java:23)

I've searched this mailinglist's archives and there were plenty repors of
NoClassDefFoundErrors, but none of them in conjunction with RESyntaxException.

I have observed this problem on three different machines, but still wonder
if it might be a configuration problem. Any ideas or hints would be greatly

Thanks in advance,


P.S.: An IntelliJ project including jdom.jar, jdom-contrib.jar and
ElementScannerTest.java which exhibits the above error can be downloaded
from: http://www.tobias-thierer.de/stuff/jdom-error.zip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20060530/9846c2cb/attachment.htm

More information about the jdom-interest mailing list