日期:2014-05-17  浏览次数:20670 次

奇怪了 访问任何页面都报这个错。。。。。。。。。。。。。。。。
严重: Servlet.service() for servlet springMVC threw exception
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
at org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:90)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:277)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:263)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:195)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1760)
at java.lang.Thread.run(Thread.java:619)



自重加了springMVC后 出现的问题  

这是配置
	
<!-- 解决延迟加载的问题 添加拦截器在 session用完后才关闭 -->
 <filter>  
        <filter-name>openSessionInView</filter-name>  
        <filter-class>  
            org.springframework.orm.hibernate3.support.OpenSessionInViewFilter  
        </filter-class>  
    </filter>  
    <filter-mapping>  
        <filter-name>openSessionInView</filter-name>  
        <url-pattern>/*</url-pattern>  
    </filter-mapping>  
<!-- end -->



<!-- 
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> -->


<!-- 自定义拦截器 -->
<!--  <listener> -->
<!--  <listener-class>com.syyx.officemanage.common.utils.ContextLoaderListener</listener-class> -->
<!--  </listener> -->

<!-- springMVC配置 -->
  <