当前位置: 代码迷 >> J2EE >> s2sh整合有关问题,现在还没解决!
  详细解决方案

s2sh整合有关问题,现在还没解决!

热度:94   发布时间:2016-04-22 00:25:24.0
s2sh整合问题,现在还没解决!求救!
信息: Initializing Spring root WebApplicationContext
17:13:50,468 ERROR org.springframework.web.context.ContextLoader:307 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'login': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManager': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in class path resource [beans.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [beans.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues((AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)

... 75 more
2012-10-21 17:13:50 com.sun.faces.config.ConfigureListener contextInitialized
信息: 初始化上下文 '/QualityLife.myeclipse.bak' 的 Mojarra 2.0.3 (FCS b03)

网上很多多说是jar冲突引起的,我把ejb3-persistence,jar删除或者javaEE中的persistence相关的删除都没用。还有人说是跟Junit中的jar包有冲突,不过我没用Junit的任何jar包,还是会报错,这究竟是什么问题??
运行环境:win7 32位,Myeclipse10,jdk1.6,struts2.3.4.1, spring3.2.0, hibernate3.6.10

------解决方案--------------------
struts2.3.4.1, spring3.2.0, hibernate3.6.10三者之间的版本号是否匹配。
我之前就是 hibernate3.6.10建立工厂访问数据库对象的时候出现了 问题,查查版本,还有几个XML配置文件的
问题。才解决完成了的。

多试试多修改
------解决方案--------------------
很有可能是jar包冲突,将你的jar包都贴出来吧
  相关解决方案