首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java相关 >

Error creating bean with name 'sessionFactory' defined in ServletContext resourc

2012-06-12 
Error creating bean with name sessionFactory defined in ServletContext resource [/WEB-INF/applica

Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]
我用struts1.1+spring2.0+hibernate3.0+ehcache1.3在没有配置ehcache前,都没有问题,程序能正常运行,但加上ehcache的配置后,启动tomcat就报错:

2008-05-07 03:02:33 StandardContext[/testhbn]action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:508)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:651)

不知道是什么原因?请帮我找找原因,先谢了。

[解决办法]
看着像
<value>com/suntravel/sunes/user/User.hbm.xml </value>
有问题,User.hbm.xml文件没什么问题吧
[解决办法]
可能是包冲突问题,把hibernate-annotations.jar删掉试试看?
[解决办法]
学习一下!
[解决办法]
同意包冲突

看看 asm.jar asm-attrs.jar cglib-2.1.3.jar commons-cllections-2.1.1.jar 是否有重复的包, 如果有删除上述重复的
[解决办法]
学习了,刚遇到了这问题。我想也是包冲突的问题。删包试试看
[解决办法]
如果是包重复了,它不会覆盖???

热点排行