严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1105) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1664) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml] at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:117) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328) ... 26 more2012-11-11 14:14:51 org.apache.catalina.core.StandardContext startInternal严重: Error listenerStart2012-11-11 14:14:52 org.apache.catalina.util.SessionIdGenerator createSecureRandom信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [187] milliseconds.2012-11-11 14:14:52 org.apache.catalina.core.StandardContext startInternal严重: Context [/ccc] startup failed due to previous errors2012-11-11 14:14:52 org.apache.catalina.core.ApplicationContext log信息: Closing Spring root WebApplicationContext2012-11-11 14:14:52 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory E:\tomcat\apache-tomcat-7.0.32\webapps\docs2012-11-11 14:14:52 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory E:\tomcat\apache-tomcat-7.0.32\webapps\examples2012-11-11 14:14:52 org.apache.catalina.core.ApplicationContext log信息: ContextListener: contextInitialized()2012-11-11 14:14:52 org.apache.catalina.core.ApplicationContext log信息: SessionListener: contextInitialized()2012-11-11 14:14:52 org.apache.catalina.core.ApplicationContext log信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@16e334a')2012-11-11 14:14:52 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory E:\tomcat\apache-tomcat-7.0.32\webapps\host-manager2012-11-11 14:14:52 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory E:\tomcat\apache-tomcat-7.0.32\webapps\manager2012-11-11 14:14:53 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory E:\tomcat\apache-tomcat-7.0.32\webapps\ROOT2012-11-11 14:14:53 org.apache.coyote.AbstractProtocol start信息: Starting ProtocolHandler ["http-bio-8080"]2012-11-11 14:14:53 org.apache.coyote.AbstractProtocol start信息: Starting ProtocolHandler ["ajp-bio-8009"]2012-11-11 14:14:53 org.apache.catalina.startup.Catalina start信息: Server startup in 8102 ms2012-11-11 14:15:03 org.apache.catalina.startup.HostConfig checkResources信息: Reloading context [/ccc]2012-11-11 14:15:08 org.apache.catalina.startup.TaglibUriRule body信息: TLD skipped. URI: http://www.springframework.org/tags/form is already defined2012-11-11 14:15:08 org.apache.catalina.startup.TaglibUriRule body信息: TLD skipped. URI: http://www.springframework.org/tags is already definedlog4j:WARN No appenders could be found for logger (com.opensymphony.xwork2.config.providers.XmlConfigurationProvider).log4j:WARN Please initialize the log4j system properly.2012-11-11 14:15:11 org.apache.catalina.core.StandardContext filterStart严重: Exception starting filter struts2Class: com.opensymphony.xwork2.spring.SpringObjectFactoryFile: SpringObjectFactory.javaMethod: getClassInstanceLine: 220 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1267) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1431) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:301) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519) at java.lang.Thread.run(Thread.java:619)Caused by: java.lang.NullPointerException at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:220) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType(XmlConfigurationProvider.java:530) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:501) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:457) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:275) at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:204) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415) ... 19 more2012-11-11 14:15:11 org.apache.catalina.core.StandardContext startInternal严重: Error filterStart2012-11-11 14:15:11 org.apache.catalina.core.StandardContext startInternal严重: Context [/ccc] startup failed due to previous errors2012-11-11 14:15:11 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks严重: The web application [/ccc] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@8353f6]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1fd6f07]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.2012-11-11 14:15:11 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks严重: The web application [/ccc] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@1846aed]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@882dfc]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
解决:
contextConfigLocation classpath:applicationContext.xml org.springframework.web.context.ContextLoaderListener
转载时请 注意原创地址: