异常信息如下:
三月 27, 2012 1:43:40 下午 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.22.
三月 27, 2012 1:43:40 下午 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
三月 27, 2012 1:43:41 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8082"]
三月 27, 2012 1:43:41 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8009"]
三月 27, 2012 1:43:41 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1491 ms
三月 27, 2012 1:43:41 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
三月 27, 2012 1:43:41 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.26
三月 27, 2012 1:43:41 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\develop-java\Tomcat\tomcat7\webapps\docs
三月 27, 2012 1:43:41 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\develop-java\Tomcat\tomcat7\webapps\examples
三月 27, 2012 1:43:42 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
三月 27, 2012 1:43:42 下午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
三月 27, 2012 1:43:42 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@7913938a')
三月 27, 2012 1:43:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\develop-java\Tomcat\tomcat7\webapps\host-manager
三月 27, 2012 1:43:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\develop-java\Tomcat\tomcat7\webapps\manager
三月 27, 2012 1:43:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\develop-java\Tomcat\tomcat7\webapps\ROOT
三月 27, 2012 1:43:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory C:\develop-java\Tomcat\tomcat7\webapps\Wastes
三月 27, 2012 1:43:42 下午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(C:\develop-java\Tomcat\tomcat7\webapps\Wastes\WEB-INF\lib\el-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
三月 27, 2012 1:43:42 下午 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(C:\develop-java\Tomcat\tomcat7\webapps\Wastes\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
三月 27, 2012 1:43:44 下午 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://www.springframework.org/tags/form is already defined
三月 27, 2012 1:43:44 下午 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://www.springframework.org/tags is already defined
三月 27, 2012 1:43:44 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2012-03-27 13:43:44,254 INFO [pool-2-thread-1]Root WebApplicationContext: initialization started
2012-03-27 13:43:44,300 INFO [pool-2-thread-1]Refreshing Root WebApplicationContext: startup date [Tue Mar 27 13:43:44 CST 2012]; root of context hierarchy
2012-03-27 13:43:44,373 INFO [pool-2-thread-1]Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
2012-03-27 13:43:44,375 ERROR [pool-2-thread-1]Context initialization failed
org.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:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
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 more
三月 27, 2012 1:43:44 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.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:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
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 more
三月 27, 2012 1:43:44 下午 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
三月 27, 2012 1:43:44 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/Wastes] startup failed due to previous errors
三月 27, 2012 1:43:44 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
三月 27, 2012 1:43:44 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8082"]
三月 27, 2012 1:43:44 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8009"]
三月 27, 2012 1:43:44 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 2661 ms
解决方法:
在web.xml文件中加入:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/config/applicationContext.xml</param-value>
</context-param>