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
相关文章推荐
- java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking
- Window下ActiveMQ报错 LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle ...
- 发生LifecycleProcessor not initialized - call 'refresh' ... 问题的可能原因
- Linux下ActiveMQ启动问题java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refres
- eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' befo
- ActiveMQ启动报错:java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' be
- activeMQ启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' bef
- eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' befo
- eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' befo
- LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the contex异常的原因
- call 'refresh' before invoking lifecycle methods
- BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the Applic
- java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before
- BeanFactory not initialized or already closed - call 'refresh' before accessing beans解决
- ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the cont
- BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the Applic
- BeanFactory not initialized or already closed - call 'refresh' before accessing beans解决办法
- BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the Applic
- BeanFactory not initialized or already closed - call 'refresh' before accessing beans解决办法
- 关于在SSH框架整合时,使用hql语句查询出现 XXX is not mapped 的问题