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

删除mapping中不需要的那个xml文件即可

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.的更多相关文章

  1. 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/boo ...

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

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

  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. Could not parse mapping document from input stream hibernate配置异常

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

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

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

  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. ASCII字符串互换

    //ASCII码转成字符: var a:String=String.fromCharCode(97); trace(a);//输出:a //字符转成ASCII码: var str:String = “ ...

  2. python练习题:三级菜单

    需求:可依次选择进入各子菜单可从任意一层往回退到上一层可从任意一层退出程序所需新知识点:列表.字典 测试环境:win7系统,python3.7.0,工具:pycharm-community-2018. ...

  3. spring boot 测试类

    import org.junit.Test;import org.junit.runner.RunWith;import org.slf4j.Logger;import org.slf4j.Logge ...

  4. 在eclipse中建立子级源码文件夹

    在eclipse中建立子级源码文件夹 右键点击项目 ---->new ---->source folder--->输入 src/main  --->勾选update exclu ...

  5. Rxjs 修改Observable 里的值

    有这么一个对象c$: Observable<any> 修改里边的值: 声明一个subject subject: Subject<any>; 在ngOnInit()中进行初始化 ...

  6. LitJson JavaScriptSerializer

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  7. Java发送HTTPS请求

    前言 上篇文章介绍了 java 发送 http 请求,大家都知道发送http是不安全的 .我也是由于对接了其他企业后总结了一套发送 https的工具.大家网上找方法很多的,但是可不是你粘过来就能用啊, ...

  8. Cause: org.xml.sax.SAXParseException; lineNumber: 45; columnNumber: 62; 元素内容必须由格式正确的字符数据或标记组成。

    三月 09, 2018 12:13:39 下午 org.apache.catalina.core.StandardContext listenerStart严重: Exception sending ...

  9. toString方法的用法

    public class JLDtoS {   public static void main(String[]args)   {    long a=123;    Long aa=new Long ...

  10. MyEclipse/eclipse 添加作者、注释、版本、时间等

    preferences>>java>>code style>>code templates>>comments>>找到相应的编辑即可