Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
yet another NoClassDefFoundError

yet another NoClassDefFoundError

2006-05-30       - By Tobias Thierer

 Back
Reply:     1     2  

Hi,

I have an XML document to parse in the form:

<a>
 <b>...</b>
 <b>...</b>
 <b>...</b>
 ..
 <b>...</b>
</a>

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

 Class.forName("org.jdom.contrib.input.scanner.JakartaRegExpXPathMatcher")

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:
org/apache/regexp/RESyntaxException
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:164)
  at
org.jdom.contrib.input.scanner.XPathMatcher.newXPathMatcher(XPathMatcher.java
:384)
  at
org.jdom.contrib.input.scanner.ElementScanner.addElementListener(ElementScanner
.java:240)
  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
appreciated.

Thanks in advance,

 Tobias

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


__ ____ ____ ____ ____ ____ ____ ____ ____ ____
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.