将spring2.5升级到spring4时遇到的错误

wakes- 2015-03-02 12:26:00
如题,原系统是spring2.5.6+hibernate3.3.2,现在将spring2.5.6改用spring4.1.4,经过一番简单的修改(以使编译通过),
然后,启动Tomcat7时就报错了:

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'cryptoStreamProvider' defined in class path resource [applicationContext.xml]: Cannot create inner bean 'com.astasys.dms.coeus.services.io.crypto.SecretKeyFactoryBean#396a1a1f' of type [com.astasys.dms.coeus.services.io.crypto.SecretKeyFactoryBean] while setting bean property 'secretKey';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.astasys.dms.coeus.services.io.crypto.SecretKeyFactoryBean#396a1a1f' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'emailSender' while setting bean property 'mailSender';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailSender' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'fileActionFacade' while setting bean property 'fileActionFacade';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileActionFacade' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'genericFacade' while setting bean property 'genericFacade';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'genericFacade' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'daoInstance' while setting bean property 'hierarchicalNodeDao';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoInstance' defined in class path resource [applicationContext.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 [hibernate.xml]: Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.hibernate.cfg.Configuration]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError

...



...全文
550 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
wakes- 2015-03-02
  • 打赏
  • 举报
回复
引用 3 楼 yj83855039 的回复:
http://www.itjhwd.com/springbxj/这是spring中所有jar包的详解,希望对你有用




这是我的
wakes- 2015-03-02
  • 打赏
  • 举报
回复
h
引用 4 楼 lsongiu86 的回复:
jar包冲突喽,用maven搞下吧,这个不会冲突的
这个项目有点老,再加上对maven的使用还不熟练,所以这个后面实在没办法再试下maven吧! 刚才我在hibernate的类ConfigHelper的167行打了个短点,发现Environment.class.getClassLoader()为null,这个怎么解啊?
lsongiu86 2015-03-02
  • 打赏
  • 举报
回复
jar包冲突喽,用maven搞下吧,这个不会冲突的
小鸭无罪 2015-03-02
  • 打赏
  • 举报
回复
http://www.itjhwd.com/springbxj/这是spring中所有jar包的详解,希望对你有用
wakes- 2015-03-02
  • 打赏
  • 举报
回复
引用 1 楼 hhy603757054 的回复:
jar包问题
应该是了,因为是将之前的老版的spring2.5.6换为spring414了!
勇敢的老散户 2015-03-02
  • 打赏
  • 举报
回复
jar包问题

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧