调试Dom4j时selectSingleNode一直报错

使用dom4j操作XML

用selectNodes()和selectSingleNode()就出错!
抛出的错误:
--------------------------------------------------------------------
java.lang.NoClassDefFoundError:   org/jaxen/JaxenException
  org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230)
  org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)
  org.dom4j.tree.AbstractNode.selectSingleNode(AbstractNode.java:183)
  com.javgame.sys.XmlConfigFile.getDataBaseList(XmlConfigFile.java:172)
  com.javgame.db.DateBaseList.initiation(DateBaseList.java:62)
  com.javgame.db.DateBaseList. <init> (DateBaseList.java:48)
  org.apache.jsp.db_jsp._jspService(db_jsp.java:56)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
----------------------------------------------------------------------------

解决方法:

下载jaxen-1.1.1.jar ,导入就行。

现在把dom4j包和它一起分享,帮我解决了大问题,谢谢

你可能感兴趣的:(dom4j,jaxen-1.1.1.jar)