8 Replies Latest reply on Mar 8, 2007 1:08 AM by Rajesh Subramanian

    Problems with JDOM + XPath in JBoss 4.0.1

    Anders Hedstrom Novice


      I have an J2EE application that uses JDOM 1.0. I'm using the XPath feature of JDOM as well. To be able to use the XPath feature you need jdom.jar plus three other jar files, jaxen-core.jar, jaxen-jdom.jar and saxpath.jar. I have packaged these four jars in my app.ear file and I have added a Class-Path entry in my ejb.jar manifest file.

      Class-Path: jdom.jar jaxen-jdom.jar jaxen-core.jar saxpth.jar

      All this work very well when I run my app in JBoss 4.0.0, but when I try to use JBoss 4.0.1 I get an exception;
      java.lang.NoClassDefFoundError: org/jdom/Text: org/jdom/Text

      A difference between 4.0.0 and 4.0.1 I have noticed is that jaxen.jar have been added to jboss-4.0.1/lib. The only way I have succeded to get my application to work in 4.0.1, is to remove jaxen.jar from jboss-4.0.1/lib. This feels like a bad solution, my guess is that JBoss needs jaxen.jar at some time...

      How am I supposed to handle this in a correct way? Can I force JBoss to use the supplied jaxen jars in the app.ear file in my app context in some way?

      Greatfull for any suggestions


      //Anders =)