9 Replies Latest reply on Dec 9, 2005 2:32 AM by Florian Hawlitzek

    How can I use xpath with dom4j under JBoss?

    Leio Wu Newbie

      the problem is--
      i want to use xpath api of dom4j,but the dom4j.jar under jboss4.0.3sp1 doesn't contain the xpath interface! i 'v been struggling for hours before i realize this,so i replaced dom4j.jar with the newest dom4j.jar in two places separately.

      But -- still it doesn't help ,because i have no means to let know jboss know where to locate the jaxen.jar which is needed when calling xpath api.
      the error stack is :

      java.lang.NoClassDefFoundError: org/jaxen/JaxenException
      at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230)
      at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)
      at org.dom4j.tree.AbstractNode.valueOf(AbstractNode.java:189)
      at cn.ios.issa.web.struts.action.NewslistAction.readPreference(NewslistAction.java:168)
      at cn.ios.issa.web.struts.action.NewslistAction.getMyNews(NewslistAction.java:155)
      at cn.ios.issa.web.struts.action.NewslistAction.execute(NewslistAction.java:127)

      so my question is , how can i let the jaxen.jar in jboss get to work,it is under the directory : %JBOSS_HOME%\server\all\deploy\ejb3.deployer

      i 'v tried to put the jaxen.jar under %JBOSS_HOME%\server\all\lib and %JBOSS_HOME%\lib and my own ear ,sadly ,that still doesn't change anything.

      responing would be much appreciated.thanks