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
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/shore/model/Husband.hbm.xml 的解决方法
1.错误/异常视图 错误/异常描述:无效的映射异常,无法从xxxxx资源中解析映射文档 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文件即可
- org.hibernate.InvalidMappingException: Could not parse mapping document from无法创建sessionFactory
把 "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd" 改为 "http://hibernate.sourc ...
- Could not parse mapping document from resource cn/spt/model/Student.hbm.xml
初始hibernate, 写第一个程序 helloworld的错误: Exception in thread "main" org.hibernate.InvalidMapping ...
- Could not parse mapping document from resource com/hs/model/StudentModel.hbm.xml
网上出现这个问题的 lei.hbm.xml配置写错的,文件头应该改为如下,并不是这个问题 <?xml version="1.0"?> <!DOCTYPE hibe ...
- InvalidMappingException提示Could not parse mapping document错误的解决方法
转自:http://www.itzhai.com/invalidmappingexception-could-not-parse-mapping-document-prompt-the-wrong-s ...
- Could not parse mapping document from input stream hibernate配置异常
十二月 , :: 下午 org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context ...
- 关于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 ...
- Could not parse mapping document from input stream
无法从输入流解析映射文档 1.定义的类名或属性名不对,如:*.hbm.xml文件中属性name对应的实体类name不一致.2.xml头文件中"http://www.hibernate.org ...
随机推荐
- DNS基础
什么是DNS? DNS--Domain name system,域名系统,简单来说就是域名和IP地址间的映射关系.当你在浏览器的地址栏输入网址(或域名,如 www,baidu.com)的时候,在网络中 ...
- Windows IIS安装php
[可参考文档:https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-i ...
- 采用ddt 可以把ddt获取的数据 塞进测试用例里面的备注里面去展示 (还没有试)
- layui流加载+h5自带模板
@{ ViewBag.Title = "服务列表"; Layout = "~/Areas/hahaha/Views/Shared/_Head.cshtml"; ...
- Docker系列07:Docker-compose
1 什么是Docker-Compose Compose项目来源于之前的fig项目,使用python语言编写,与docker/swarm配合度很高. Compose 是 Docker 容器进行编排的工 ...
- python常见用法
1.冒泡排序 a = [25,15,47,36,44,455,67,234,7,8,-47] def sortport(): for i in range(len(a)-1): for j in ra ...
- maven的安装和配置
这篇文章主要是对maven安装说明,以便后续翻阅,本人刚接触,请多见谅! 1.maven官网下载:http://maven.apache.org/download.cgi 2.解压到你想要放的路径里, ...
- Android 开发 框架系列 glide-transformations 图片处理基本使用
首先简单的介绍一下Gilde作用范围.Gilde功能十分强大,它可以实现图片处理.图片本地加载.图片网络加载.位图加载.图片内存缓存.图片磁盘缓存.Gif图片加载.使用简单轻松,轻松的后是它强大的心, ...
- python中并发编程基础1
并发编程基础概念 1.进程. 什么是进程? 正在运行的程序就是进程.程序只是代码. 什么是多道? 多道技术: 1.空间上的复用(内存).将内存分为几个部分,每个部分放入一个程序,这样同一时间在内存中就 ...
- React Native在window下的环境搭建(一)
React Native官方开发文档 以下是本人抄录的: 初次接触React Native感觉和React很像,却是有点类似,但不完全是,React Native有自己的组件对象,不过它也自定义的组件 ...