您的位置:首页 > Web前端

SSH框架整合出现“LifecycleProcessor not initialized - call 'refresh' before invoking”问题

2016-11-23 10:53 495 查看
     
   今天在进行SSH(spring+springmvc+hibernate)框架整合的时候,一启动项目,莫名地就出现了这么一个错误,搞了大半天,还是报这些错误:
1:java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [
2:java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [
3:Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
      然后就去找度娘了,根据度娘的查询,总结到的所有的解决办法有:
1. web.xml中没有配置ContextLoaderListener监听,
需要配置:
<listener>
 <listener-class>
 org.springframework.web.context.ContextLoaderListener
</listener-class>
 </listener>
2. 少 aopalliance.jar包,网上下载;
3. tomcat问题,关闭tomcat,clean,然后再重启;
4. tomcat的JDK版本和工程的JDK版本不一致,spring版本不支持jdk的版本,检查JDK配置;
5. applicationContext.xml 中 xml 格式不正确;
6. 引入的application的配置文件有问题,可能是id或者property重复;
7. xml配置文件的配置顺序有问题;
8. spring版本过低,需要配置4.0以上的版本;
9. jar包缺失或冲突;

      这些解决问题的方法我都一一试过,最后,终于解决问题了~
      对于不同的项目出现此问题的源头可能不一样,所以需要具体实践去查看是什么原因造成的错误。对于我的项目来说,出现此问题的原因就是导入的jar包之间有冲突,所以需谨慎配置jar包。
      虽然这是个老问题,但是还是希望该贴能帮助到大家~~~

       附上新版本SSH(springmvc+spring4.1+hibernate4.0)整合无冲突jar包,不需要资源分,免费赠送,下载地址: http://download.csdn.net/detail/alan_liuyue/9690653
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐