啥情况啊 我不明白是啥错误原因,
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/08/12 04:48:59
啥情况啊 我不明白是啥错误原因,
Exception in thread "main" org.hibernate.InvalidMappingException:Could not parse mapping document from resource entity1/District.xml
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:4009)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXmlQueue(Configuration.java:3998)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3986)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1398)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1856)
at entity1.test.main(test.java:24)
Caused by:org.hibernate.DuplicateMappingException:duplicate import:District refers to both entity1.District and entity.District (try using auto-import="false")
at org.hibernate.cfg.Configuration$MappingsImpl.addImport(Configuration.java:3190)
at org.hibernate.cfg.HbmBinder.bindPersistentClassCommonValues(HbmBinder.java:672)
at org.hibernate.cfg.HbmBinder.bindClass(HbmBinder.java:586)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:324)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:177)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:4006)
...5 more
Exception in thread "main" org.hibernate.InvalidMappingException:Could not parse mapping document from resource entity1/District.xml
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:4009)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXmlQueue(Configuration.java:3998)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3986)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1398)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1856)
at entity1.test.main(test.java:24)
Caused by:org.hibernate.DuplicateMappingException:duplicate import:District refers to both entity1.District and entity.District (try using auto-import="false")
at org.hibernate.cfg.Configuration$MappingsImpl.addImport(Configuration.java:3190)
at org.hibernate.cfg.HbmBinder.bindPersistentClassCommonValues(HbmBinder.java:672)
at org.hibernate.cfg.HbmBinder.bindClass(HbmBinder.java:586)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:324)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:177)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:4006)
...5 more
![啥情况啊 我不明白是啥错误原因,](/uploads/image/z/7627204-28-4.jpg?t=%E5%95%A5%E6%83%85%E5%86%B5%E5%95%8A+%E6%88%91%E4%B8%8D%E6%98%8E%E7%99%BD%E6%98%AF%E5%95%A5%E9%94%99%E8%AF%AF%E5%8E%9F%E5%9B%A0%2C)
中文是
在线程的“主”org.hibernate.invalidmappingexception例外:无法解析从资源entity1 / district.xml映射文件
在牛津.冬眠.CFG.配置metadatasourcequeue美元.processhbmxml(配置.Java:4009)
在牛津.冬眠.CFG.配置metadatasourcequeue美元.processhbmxmlqueue(配置.Java:3998)
在牛津.冬眠.CFG.配置metadatasourcequeue美元.processmetadata(配置.Java:3986)
在牛津.冬眠.CFG.配置.secondpasscompile(配置.Java:1398)
在牛津.冬眠.CFG.配置.buildsessionfactory(配置.Java:1856)
在entity1.试验.主要(测试.Java:24)
引起的:org.hibernate.duplicatemappingexception:复制进口:区是指entity1.区和实体.区(尝试使用自动导入=“假”)
在牛津.冬眠.CFG.配置mappingsimpl美元.addimport(配置.Java:3190)
在牛津.冬眠.CFG.hbmbinder.bindpersistentclasscommonvalues(hbmbinder.Java:672)
在牛津.冬眠.CFG.hbmbinder.bindclass(hbmbinder.Java:586)
在牛津.冬眠.CFG.hbmbinder.bindrootclass(hbmbinder.Java:324)
在牛津.冬眠.CFG.hbmbinder.bindroot(hbmbinder.Java:177)
在牛津.冬眠.CFG.配置metadatasourcequeue美元.processhbmxml(配置.Java:4006)
…5
在线程的“主”org.hibernate.invalidmappingexception例外:无法解析从资源entity1 / district.xml映射文件
在牛津.冬眠.CFG.配置metadatasourcequeue美元.processhbmxml(配置.Java:4009)
在牛津.冬眠.CFG.配置metadatasourcequeue美元.processhbmxmlqueue(配置.Java:3998)
在牛津.冬眠.CFG.配置metadatasourcequeue美元.processmetadata(配置.Java:3986)
在牛津.冬眠.CFG.配置.secondpasscompile(配置.Java:1398)
在牛津.冬眠.CFG.配置.buildsessionfactory(配置.Java:1856)
在entity1.试验.主要(测试.Java:24)
引起的:org.hibernate.duplicatemappingexception:复制进口:区是指entity1.区和实体.区(尝试使用自动导入=“假”)
在牛津.冬眠.CFG.配置mappingsimpl美元.addimport(配置.Java:3190)
在牛津.冬眠.CFG.hbmbinder.bindpersistentclasscommonvalues(hbmbinder.Java:672)
在牛津.冬眠.CFG.hbmbinder.bindclass(hbmbinder.Java:586)
在牛津.冬眠.CFG.hbmbinder.bindrootclass(hbmbinder.Java:324)
在牛津.冬眠.CFG.hbmbinder.bindroot(hbmbinder.Java:177)
在牛津.冬眠.CFG.配置metadatasourcequeue美元.processhbmxml(配置.Java:4006)
…5