使用dom4j时SelectNodes()方法报错

it2024-11-11  10

使用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 ,导入就行。

http://jaxen.org/releases.html

转载于:https://www.cnblogs.com/wuhenke/archive/2012/10/23/2734980.html

相关资源:数据结构—成绩单生成器
最新回复(0)