org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/domain/book.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:586)
at org.hibernate.cfg.Configuration.addClass(Configuration.java:633)
at com.service.Show.<clinit>(Show.java:17)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:555)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:583)
... 2 more
Caused by: org.dom4j.DocumentException: www.hibernate.org Nested exception: www.hibernate.org
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:546)
... 3 more
Exception in thread "main" java.lang.NullPointerException
at com.service.Show.findAllNews(Show.java:30)
at com.service.Show.main(Show.java:53)

忙了好几天,才写出第一个程序,在自习室写的,弄了好长时间有上述错误,中午去了图书馆,联网,百度,

结果一会就好了,下午去自习室准备回顾加强一下,结果又有上述错误,回到宿舍联网下载百度云的备份,对比了一下,一样,原来是要联网的。。

那么如何解决呢?http://www.cnblogs.com/xiaoluo501395377/archive/2012/11/06/2756204.html

magle

org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/domain/book.hbm.xml 联网跑一跑的更多相关文章

  1. 错误/异常:org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/shore/model/Husband.hbm.xml 的解决方法

    1.错误/异常视图 错误/异常描述:无效的映射异常,无法从xxxxx资源中解析映射文档 2.解决方法     出现这个异常,一般情况下是包名写错了.改回来即可. 看报错/异常的第一行,最后面,会提示你 ...

  2. Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource Caused by: org.hibernate.DuplicateMappingException: duplicate import: Person refers to both cn.itcast.

    此错误是说有两个相同的名字的配置文件,所以不知道查找哪个.解决方法就是把不需要的那个配置文件删除. 删除mapping中不需要的那个xml文件即可

  3. org.hibernate.InvalidMappingException: Could not parse mapping document from无法创建sessionFactory

    把 "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd" 改为 "http://hibernate.sourc ...

  4. Could not parse mapping document from resource cn/spt/model/Student.hbm.xml

    初始hibernate, 写第一个程序 helloworld的错误: Exception in thread "main" org.hibernate.InvalidMapping ...

  5. Could not parse mapping document from resource com/hs/model/StudentModel.hbm.xml

    网上出现这个问题的 lei.hbm.xml配置写错的,文件头应该改为如下,并不是这个问题 <?xml version="1.0"?> <!DOCTYPE hibe ...

  6. InvalidMappingException提示Could not parse mapping document错误的解决方法

    转自:http://www.itzhai.com/invalidmappingexception-could-not-parse-mapping-document-prompt-the-wrong-s ...

  7. Could not parse mapping document from input stream hibernate配置异常

    十二月 , :: 下午 org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context ...

  8. 关于hibernate总是报错 配置factory的id找不到,mapping配置文件Could not parse mapping document from input stream

    Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream ...

  9. Could not parse mapping document from input stream

    无法从输入流解析映射文档 1.定义的类名或属性名不对,如:*.hbm.xml文件中属性name对应的实体类name不一致.2.xml头文件中"http://www.hibernate.org ...

随机推荐

  1. python unittest setUp 和 setUpClass 区别

    import unittest class Test(unittest.TestCase): def setUp(self): print("start!=======") def ...

  2. 织梦Dedecms文件目录结构

    Dedecms文件目录结构 /根目录 ../a 默认生成文件存放目录 ../data 系统缓存或其他可写入数据存放目录 ../dede 默认后台登录管理(可任意改名) ../images 系统默认的部 ...

  3. python虚拟环境virtualenv简介

    参考网站: https://realpython.com/python-virtual-environments-a-primer/ 一. 创建一个新的虚拟环境 # Python 2: $ virtu ...

  4. Padavan老毛子固件:17CE插件集成

    Padavan老毛子固件:17CE插件集成 1.老毛子路由设置:系统管理-服务-启动SSH服务器     以下链接下载 "winscp" http://down.orsoon.co ...

  5. 在高并发情况nginx的作用

    1 场景一:如图 在单机的情况下例如:单个tomcat 有100w条请求的时候,而默认tomcat支持的并发数量并不能达到要求,所所以单台服务器 扛不住 容易宕机,瘫痪 2 高并发的情况下要让服务器不 ...

  6. Dapper/SqlMapper映射对应问题

    Dapper, a light weight object mapper for ADO.NET 轻量级orm辅助类,不用配置,直接引入一个cs文件或者引入其dll就能使用. 使用连接对象的query ...

  7. Python安装与Pycharm使用入门

    一.安装Python 1.Linux下安装 一般系统默认已安装2.6.6版本,升级成2.7版本, 但 2.6 不能删除,因为系统对它有依赖,epel源里最新的也是2.6版本,所以以源代码的方式安装2. ...

  8. Linux安装rz/sz,htop插件

    Linux下rz/sz安装及使用方法 sz: 将选定的文件发送(send)到本地机器; rz:运行该命令会弹出 一个文件选择窗口, 从本地选择文件上传到服务器(receive). 下载安装包 lrzs ...

  9. 【Linux】【Selenium】安装Chrome和ChromeDriver的配置

    转自:https://www.cnblogs.com/longronglang/p/8078898.html 1.安装chrome sudo apt-get install libxss1 libap ...

  10. Servlet-知识点

    2018年10月05日 16:52:56 yigg 阅读数:38   1.JavaWeb开发的目录结构 https://blog.csdn.net/u012661010/article/details ...