专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Java Exception

错误:Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB

发布时间:2010-06-05 12:36:06 文章来源:www.iduyao.cn 采编人员:星星草

我用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 是否有重复的包, 如果有删除上述重复的
------解决方法--------------------------------------------------------
刚遇到了这问题。我想也是包冲突的问题。删包试试看
 

    
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: