org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/domain/book.hbm.xml 联网跑一跑

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

时间: 2024-10-21 04:22:26

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

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

把 "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd" 改为 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> 原文地址:https://www.cnblogs.com/zhaocundang/p/9922005.html

hibernate 出现Could not parse mapping document from resource 报错

<!-- 映射文件的根节点 --> <hibernate-mapping > <!-- 对象关系映射的开始:class元素表示类和数据库中的表的映射关系. name属性指定持久化类(或者接口)的Java全限定名: table属性指定要映射的对应的数据库表名,如果省略,则以name作为表名 --> <class name="com.hibernate.customer.customer" table="customer">

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

初始hibernate, 写第一个程序 helloworld的错误: Exception in thread "main" org.hibernate.InvalidMappingException: Could not parse mapping document from resource cn/spt/model/Student.hbm.xml at org.hibernate.cfg.Configuration.addResource(Configuration.java:61

hibernate报错:could not parse mapping document from resource

昨晚在自己电脑上搭建的ssh环境运行好好的,搭建成功的时候我还小兴奋了下,然后今天放到公司的电脑上去,直接给我报了个could not parse mapping document from resource,当时我那小心肝直接碎了,并且这个错误还让我改了几个小时,最后在http://blog.csdn.net/mydeman/article/details/6134820 发现了答案,*.hbm.xml中引用了错误的DTD文件路径“http://www.hibernate.org/dtd/hi

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

十二月 18, 2016 4:24:29 下午 org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.B

Could not parse mapping document from file

java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccesso

Could not parse mapping document from input stream

无法从输入流解析映射文档 1.定义的类名或属性名不对,如:*.hbm.xml文件中属性name对应的实体类name不一致.2.xml头文件中"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">改为:     "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"  (一般没关系)

Caused by:org.hibernate.DuplicateMappingException:Duplicate class/entity/ mapping

1.错误描述 java.lang.ExceptionInInitializerError Caused by:org.hibernate.InvalidMappingException:Could not parse mapping document from resource com/you/model/Monkey.hbm.xml Caused by:org.hibernate.DuplicateMappingException:Duplicate class/entity/ mapping

Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.you.flex.mode

1.错误描述 2015-09-21 00:02:09 [main] WARN org.springframework.context.support.GenericApplicationContext - Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.BeanCreationException: Error cre