当前位置: 代码迷 >> Java Web开发 >> spring mvc + freemarker调整报错了
  详细解决方案

spring mvc + freemarker调整报错了

热度:488   发布时间:2016-04-10 22:42:35.0
spring mvc + freemarker整合报错了
2014-3-24 15:08:58 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoSuchMethodError: org.springframework.web.context.support.XmlWebApplicationContext.getEnvironment()Lorg/springframework/core/env/ConfigurableEnvironment;
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:87)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:465)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:395)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:381)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:293)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4323)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4780)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:785)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:763)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:557)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1124)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1047)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:542)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1390)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:355)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:313)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:293)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:996)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:771)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:988)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:427)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:649)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
at org.apache.catalina.startup.Catalina.start(Catalina.java:585)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
2014-3-24 15:08:58 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
2014-3-24 15:08:58 org.apache.catalina.core.StandardContext startInternal
严重: Context [/Freemarker] startup failed due to previous errors
2014-3-24 15:08:58 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2014-3-24 15:08:58 org.apache.catalina.core.StandardContext listenerStop
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Mon Mar 24 15:08:58 CST 2014]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:327)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:990)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:946)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:551)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:115)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4362)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:4933)
  相关解决方案