Exception in thread "main" org.hibernateInvalidMappingException出现这种情况怎么处理急求帮助啊!!

atorg.hibernate.cfg.Configuration.doConfigure(Configuration.java:1556)atorg.hibernate... at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1556)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:1035)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:64)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1476)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1017)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:64)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1011)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:64)
at TeacherTest.main(TeacherTest.java:18)
Caused by: org.hibernate.MappingException: Could not parse mapping document in input stream
at org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:783)
at org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:64)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:613)
... 16 more
Caused by: org.dom4j.DocumentException: Error on line 2 of document : The processing instruction target matching "[xX][mM][lL]" is not allowed. Nested exception: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:773)
... 18 more
展开
 我来答
蜈蚣侯爷
2014-08-14 · 超过21用户采纳过TA的回答
知道答主
回答量:97
采纳率:0%
帮助的人:50.5万
展开全部
你这是缺少异常处理,请尝试添加try catch exception,具体看看书
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式