xml可扩展标记语言,标准通用标记语言的子集,是一种用于标记电子文件使其具有结构性的标记语言。

在web中,今天我本想测试一下用xml做为数据库存储用户信息,但是在查询用户信息的时候一直发生:

java.lang.NoClassDefFoundError: org/jaxen/JaxenException
at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:222)
at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:202)
at org.dom4j.tree.AbstractNode.selectSingleNode(AbstractNode.java:178)
at com.changeyd.user.dao.UserDao.findByUsername(UserDao.java:49)
at test.dao.UserDaoTest.testFindByUsername(UserDaoTest.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.ClassNotFoundException: org.jaxen.JaxenException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 28 more

经过寻找错误,发现在对XML文件进行操作的时候,不止需要导入dom4j.jar,还需要jaxem.1.1-beta.jar包,所以导入就不会找不到异常了

所以附上jar免费下载链接:

http://112.17.28.180/file3.data.weipan.cn/57515002/adbce74e61d68b4f2a205eda5a51e17ccf3de723?ip=1528191886,39.178.39.186&ssig=WZiffPmt%2Bx&Expires=1528192486&KID=sae,l30zoo1wmz&fn=jaxen-1.1-beta-6.jar&skiprd=2&se_ip_debug=39.178.39.186&corp=2&from=1221134&wsrid_tag=5b1656df_iydong72_13487-28782&wsiphost=ipdb

对xml进行数据查询时发生NoClassDefFoundError,dom4j和jaxen的更多相关文章

  1. bootstrap table分页,重新数据查询时页码为当前页问题

    问题描述: 使用bootstrap table时遇到一个小问题,第一次查询数据未5页,翻页到第5页后,选中条件再次查询数据时,传到后端页码仍旧为5,而此时数据量小于5页,表格显示为未查询到数据. 处理 ...

  2. 8.15 session 有效时间, session在数据查询中最后不用

    1.在tomcat-->conf-->conf/web.xm中的<session-config>中设置: <session-config> <session- ...

  3. SpringBoot使用JPA来做数据查询

    Spring-Data-JPA在做数据存储方面真的很方便,它的目的就是写更少的代码,更多的事情,但是也有其力有未逮或者说处理起来比较闹心的地方. 1.先来感受一下使用JPA做数据查询时,代码的简化程度 ...

  4. MySQL - 数据查询 - 简单查询

    1. 简述 查询数据是指从数据库中获取所需要的数据.如Jack 要达到验证用户名和密码的目的,就需要从数据库已保存的用户表中读取当前用户的密码进行验证,以验明正身!保存查询数据是数据库操作中常用且重要 ...

  5. MySQL数据库基础(4)SELECT 数据查询

    目录 一.SELECT 选择列表 二.MySQL 运算符 三.定制显示查询结果 四.模糊查询 一.SELECT 选择列表 1.语法 SELECT <COLUMN1, COLUMN2, COLUM ...

  6. MySQL数据操作与查询笔记 • 【第4章 SELECT 数据查询】

    全部章节   >>>> 本章目录 4.1 select 选择列表 4.1.1 select 基本结构 4.1.2 选择列表 4.2 MySQL 运算符 4.2.1 MySQL ...

  7. 在使用Ibatis查询数据返回时,报如下错误:java ibatis The error happened while setting a property on the result object

    问题: 在使用Ibatis查询数据返回时,报如下错误: [com.show.add.proxy.SqlMapClientTemplateProxy]com.ibatis.common.jdbc.exc ...

  8. 深入理解 EF Core:EF Core 读取数据时发生了什么?

    阅读本文大概需要 11 分钟. 原文:https://bit.ly/2UMiDLb 作者:Jon P Smith 翻译:王亮 声明:我翻译技术文章不是逐句翻译的,而是根据我自己的理解来表述的.其中可能 ...

  9. 深入理解 EF Core:EF Core 写入数据时发生了什么?

    阅读本文大概需要 14 分钟. 原文:https://bit.ly/2C67m1C 作者:Jon P Smith 翻译:王亮 声明:我翻译技术文章不是逐句翻译的,而是根据我自己的理解来表述的.其中可能 ...

随机推荐

  1. centos7/RHEL7下快速搭建DNS域名解析服务器

    应用场境:此处搭建的DNS(Domain Name Server)更加偏向于企业内部需要一个域名服务器专门用来解析自己局域网内定义的域名: 比如:app1.company.com, app2.comp ...

  2. hdu 3790 最短路问题 (spfa练手)

    Problem Description 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的.   Inp ...

  3. nginx thinkphp只能访问首页

    代码部署到了服务器上,发现无论怎样请求,都是跳转到index/index/index(模块/控制器/方法),最后需要nginx重新地址即可 参考:Linux下Nginx部署Thinkphp5访问任何地 ...

  4. Building Microservices with Spring Boot and Apache Thrift. Part 1 with servlet

    https://dzone.com/articles/building-microservices-spring In the modern world of microservices it's i ...

  5. Home School Books美国家庭学校教育小学初中高中全套美语教材

    加州的资料总共买过三次: ①优妈妈儿童教育,买过美国加州小学一.二年级的语文及相应的练习册,并买了纸版资料. (这是自己学习用的) ②美国加州原版小学教材Reading Wonders 2014新版语 ...

  6. Django(三)框架之第二篇

    https://www.cnblogs.com/haiyan123/p/7717788.html 一.知识点回顾 1.MTV模型 model:模型,和数据库相关的 template:模板,存放html ...

  7. React之Perf

    import Perf from 'react-addons-perf' // ES6语法 var Perf = require('react-addons-perf') // ES5语法针对node ...

  8. Luogu P3966 [TJOI2013]单词

    题目链接 \(Click\) \(Here\) 本题\(AC\)自动机写法的正解之一是\(Fail\)树上跑\(DP\). \(AC\)自动机是\(Trie\)树和\(Fail\)树共存的结构,前者可 ...

  9. java十进制转三十六进制

    import java.util.HashMap; public class Ten2Thirty { private static final String X36 = "01234567 ...

  10. 20165232 2017-2018-2《Java程序设计》结对编程一 第一周总结

    20165232 2017-2018-2<Java程序设计>结对编程一 第一周总结 结对对象 20165219王彦博 20165232何彦达 需求分析 实现一个程序,要求: 1 支持整数运 ...