There appears to be a class loader problem in Tomcat 5.5.x when using jaxen 1.1.1 and dom4j version 1.6.1. I use the same jaxen 1.1.1 and dom4j version 1.6.1 jar file in a standalone application and it works fine. I verified that the class, Branch, does exist in the jar file. However, using the same jaxen and dom4j jar files in either WEB-INF/lib or common/lib of Tomcat 5.5.23 generates the following error when loading a servlet that uses the jaxen/dom4j libraries:
java.lang.NoClassDefFoundError: org/dom4j/Branch at org.jaxen.dom4j.DocumentNavigator.getChildAxisIterator(DocumentNavigator.java:211) at org.jaxen.expr.iter.IterableChildAxis.iterator(IterableChildAxis.java:82) at org.jaxen.expr.DefaultStep.axisIterator(DefaultStep.java:139) at org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:188) at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:107) at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:716) at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:239) at org.dom4j.xpath.DefaultXPath.selectNodes(DefaultXPath.java:132) at org.dom4j.tree.AbstractNode.selectNodes(AbstractNode.java:166) at javarex.beans.servlet.BaseForm.getForm_field_properties_as_array(BaseForm.java:945) ... I also verified that the problem of not being able to load the class exists with earlier versions of dom4j and with earlier versions of Tomcat. Are there other libraries in Tomcat that have a different version of jaxen that conflicts with the one I supply with the servlet? This issue has me at a stand still. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user