Exception sending context initialized event to listener instance of class org.sp

2010-3-31 17:45:22 org.apache.catalina.core.AprLifecycleListener init

信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\MyEclipse 6.5\bin;D:\apache-tomcat-6.0.14\bin

2010-3-31 17:45:22 org.apache.coyote.http11.Http11Protocol init

信息: Initializing Coyote HTTP/1.1 on http-8080

2010-3-31 17:45:22 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 465 ms

2010-3-31 17:45:23 org.apache.catalina.core.StandardService start

信息: Starting service Catalina

2010-3-31 17:45:23 org.apache.catalina.core.StandardEngine start

信息: Starting Servlet Engine: Apache Tomcat/6.0.14

2010-3-31 17:45:24 org.apache.catalina.core.ApplicationContext log

信息: Initializing Spring root WebApplicationContext

log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).

log4j:WARN Please initialize the log4j system properly.

2010-3-31 17:45:24 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]

Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]

    at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:99)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:307)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:290)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)

    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)

    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)

    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)

    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)

    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:394)

    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)

    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)

    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)

    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)

    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)

    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)

    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)

    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)

    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)

    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)

    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)

    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

    at org.apache.catalina.core.StandardService.start(StandardService.java:516)

    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

    at org.apache.catalina.startup.Catalina.start(Catalina.java:566)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

2010-3-31 17:45:24 org.apache.catalina.core.StandardContext start

严重: Error listenerStart

2010-3-31 17:45:24 org.apache.catalina.core.StandardContext start

严重: Context [/Demo] startup failed due to previous errors

2010-3-31 17:45:24 org.apache.catalina.core.ApplicationContext log

信息: Closing Spring root WebApplicationContext

2010-3-31 17:45:25 org.apache.catalina.core.ApplicationContext log

信息: ContextListener: contextInitialized()

2010-3-31 17:45:25 org.apache.catalina.core.ApplicationContext log

信息: SessionListener: contextInitialized()

2010-3-31 17:45:25 org.apache.coyote.http11.Http11Protocol start

信息: Starting Coyote HTTP/1.1 on http-8080

2010-3-31 17:45:25 org.apache.jk.common.ChannelSocket init

信息: JK: ajp13 listening on /0.0.0.0:8009

2010-3-31 17:45:25 org.apache.jk.server.JkMain start

信息: Jk running ID=0 time=0/32  config=null

2010-3-31 17:45:25 org.apache.catalina.startup.Catalina start

信息: Server startup in 2430 ms

解决方法:
列:在Web.xml中
<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>
   /WEB-INF/applicationContext_persist.xml
  </param-value>
</context-param>
<listener>
  <listener-class>
   org.springframework.web.context.ContextLoaderListener
  </listener-class>
</listener>

<filter>
  <filter-name>struts2</filter-name>
  <filter-class>
   org.apache.struts2.dispatcher.FilterDispatcher
  </filter-class>
</filter>
<filter-mapping>
  <filter-name>struts2</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
  <welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

你可能感兴趣的:(java,apache,tomcat,Web,log4j)