Context startup failed due to previous errors

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

这个异常在WEB服务重启时出现,造成这个异常的原因有多种

 

1.如果在这个异常前面有其它异常,请先解决前面的异常,因为其它的异常也会导致这个结果,比如:服务启动时找不到类,配置文件读取异常等。 当你前面的异常解决后这个异常自然也就消失了。

 

2.如果前面的异常都解决了还会出现这个异常

A.

web.xml中配置spring的启动方式,是用的监听器模式

<listener>

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

</listener>

改为servlet启动模式。

<servlet>

<servlet-name>context</servlet-name>

<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>

<load-on-startup>1</load-on-startup>

</servlet>

B.

如果你的应用用到了远程网络,请检查你本地或者远程网络是否正常

C.

查检是否有jar包版本冲突

D.

清空work目录下的文件 ,重启服务器。 这里主要考滤的是缓存的问题。

当然还有其它的可能性,这里就不一一列出了。

但有一点我们要记住了,当出现较比异常时,一定要从第一个异常开始解决,反对跳越式的处理异常。

因为后面的异常极有可能是前面异常引起的,本来这块没问题却因为你看到了某个异常去修改了,导致后面的问题越来越多,到最后所有的东西都乱了,根本就无从下手。 所以养成一个好的习惯是很有必要的。

阅读更多

Context [] startup failed due to previous errors

07-20

[code=HTML]rn2012-7-20 17:00:44 org.apache.catalina.core.AprLifecycleListener initrn信息: Loaded APR based Apache Tomcat Native library 1.1.22.rn2012-7-20 17:00:44 org.apache.catalina.core.AprLifecycleListener initrn信息: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].rn2012-7-20 17:00:45 org.apache.coyote.AbstractProtocol initrn信息: Initializing ProtocolHandler ["http-apr-7070"]rn2012-7-20 17:00:45 org.apache.coyote.AbstractProtocol initrn信息: Initializing ProtocolHandler ["ajp-apr-8009"]rn2012-7-20 17:00:45 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 1537 msrn2012-7-20 17:00:45 org.apache.catalina.core.StandardService startInternalrn信息: Starting service Catalinarn2012-7-20 17:00:45 org.apache.catalina.core.StandardEngine startInternalrn信息: Starting Servlet Engine: Apache Tomcat/7.0.22rn2012-7-20 17:00:45 org.apache.catalina.startup.HostConfig deployDescriptorrn信息: Deploying configuration descriptor apa7soft.xml from I:\apache-tomcat-7.0.11\conf\catalina\localhostrn2012-7-20 17:00:45 org.apache.tomcat.util.digester.Digester endElementrn警告: No rules found matching 'Context/Logger'.rn2012-7-20 17:00:46 org.apache.catalina.core.StandardContext startInternalrn严重: Error listenerStartrn2012-7-20 17:00:46 org.apache.catalina.core.StandardContext startInternalrn严重: Context [/soft] startup failed due to previous errorsrn2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory docsrn2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory examplesrn2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory host-managerrn2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory managerrn2012-7-20 17:00:46 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory ROOTrn2012-7-20 17:00:46 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["http-apr-7070"]rn2012-7-20 17:00:46 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["ajp-apr-8009"]rn2012-7-20 17:00:46 org.apache.catalina.startup.Catalina startrn信息: Server startup in 1118 msrn[/code]rnrn求解

Tomcat启动报错,Error listenerStart Context startup failed due to previous errors

11-06

Tomcat启动报错rnrnrn启动日志:rnrn2009-11-6 21:39:13 org.apache.coyote.http11.Http11Protocol initrn信息: Initializing Coyote HTTP/1.1 on http-8080rn2009-11-6 21:39:13 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 578 msrn2009-11-6 21:39:13 org.apache.catalina.core.StandardService startrn信息: Starting service Catalinarn2009-11-6 21:39:13 org.apache.catalina.core.StandardEngine startrn信息: Starting Servlet Engine: Apache Tomcat/5.0.30rn2009-11-6 21:39:13 org.apache.catalina.core.StandardHost startrn信息: XML validation disabledrn2009-11-6 21:39:13 org.apache.catalina.core.StandardHost getDeployerrn信息: Create Host deployer for direct deployment ( non-jmx ) rn2009-11-6 21:39:13 org.apache.catalina.core.StandardHostDeployer installrn信息: Processing Context configuration file URL file:D:\server\Tomcat 5.0\conf\Catalina\localhost\admin.xmlrn2009-11-6 21:39:14 org.apache.catalina.core.StandardHostDeployer installrn信息: Processing Context configuration file URL file:D:\server\Tomcat 5.0\conf\Catalina\localhost\balancer.xmlrn2009-11-6 21:39:14 org.apache.catalina.core.StandardHostDeployer installrn信息: Processing Context configuration file URL file:D:\server\Tomcat 5.0\conf\Catalina\localhost\manager.xmlrn2009-11-6 21:39:15 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path /jsp-examples from URL file:D:\server\Tomcat 5.0\webapps\jsp-examplesrn2009-11-6 21:39:15 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path /servlets-examples from URL file:D:\server\Tomcat 5.0\webapps\servlets-examplesrn2009-11-6 21:39:15 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path /sshtest from URL file:D:\server\Tomcat 5.0\webapps\sshtestrnlog4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).rnlog4j:WARN Please initialize the log4j system properly.rn2009-11-6 21:39:17 org.apache.catalina.core.StandardContext startrn[color=#FF0000]严重: Error listenerStart[/color]rn2009-11-6 21:39:17 org.apache.catalina.core.StandardContext startrn[color=#FF0000]严重: Context startup failed due to previous errors[/color]2009-11-6 21:39:17 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path /tomcat-docs from URL file:D:\server\Tomcat 5.0\webapps\tomcat-docsrn2009-11-6 21:39:17 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path /webdav from URL file:D:\server\Tomcat 5.0\webapps\webdavrn2009-11-6 21:39:17 org.apache.coyote.http11.Http11Protocol startrn信息: Starting Coyote HTTP/1.1 on http-8080rn2009-11-6 21:39:17 org.apache.jk.common.ChannelSocket initrn信息: JK2: ajp13 listening on /0.0.0.0:8009rn2009-11-6 21:39:17 org.apache.jk.server.JkMain startrn信息: Jk running ID=0 time=0/63 config=D:\server\Tomcat 5.0\conf\jk2.propertiesrn2009-11-6 21:39:17 org.apache.catalina.startup.Catalina startrn信息: Server startup in 3657 msrnrnrnlogs下的详细日志 就是找不到customerServicernrn2009-11-06 21:41:26 StandardContext[/sshtest]Initializing Spring root WebApplicationContextrn2009-11-06 21:41:27 StandardContext[/sshtest]Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerService' defined in ServletContext resource [/WEB-INF/spring/applicationContext-spring.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: No bean class specified on bean definitionrnrnrn代码文件rnapplicationContext-spring.xmlrn[code=XML]rnrnrn rn rn rn rn rn rn rn rn rn rn rn rnrnrn[/code]rnrnapplicationContext-hibernate.xmlrn[code=XML]rnrnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn org.hibernate.dialect.Oracle9Dialectrn rn rn rn rn rn com/test/hibernate/entity/Customer.hbm.xmlrn rn rn rn rn rn rn rn rnrnrn[/code]rnrnCustomerDAOImplrn[code=Java]rnpublic class CustomerDAOImpl extends HibernateDaoSupport implements CustomerDAO rnrn public void delete(Integer id) rn // TODO Auto-generated method stubrn this.getHibernateTemplate().delete(this.getCustomerById(id));rn rnrn public void save(Customer cus) rn // TODO Auto-generated method stubrn this.getHibernateTemplate().save(cus);rn rnrnrn public void update(Integer id) rn // TODO Auto-generated method stubrn this.getHibernateTemplate().update(this.getCustomerById(id));rn rnrn public Customer getCustomerById(Integer id) rn // TODO Auto-generated method stubrn return (Customer) this.getHibernateTemplate().get(Customer.class, id);rn rnrn public Customer getCustomerByLoginId(String loginId) rn // TODO Auto-generated method stubrn String hql="from Customer c where c.loginId = ?";rn List list=this.getHibernateTemplate().find(hql);rn Customer cus = list.get(0);rn return cus;rn rnrn[/code]rnrnCustomerServiceImplrn[code=Java]rnpublic class CustomerServiceImpl implements CustomerService rnrn private CustomerDAO dao;rn rn public void addUser(Customer user) rn // TODO Auto-generated method stubrn dao.save(user);rn rnrn public boolean checkLogin(String loginId, String pass) rn // TODO Auto-generated method stubrn Customer cus=dao.getCustomerByLoginId(loginId);rn rn if(cus!=null && cus.getPassword().equals(pass))rn return true;rn rn return false;rn rnrn public Customer getCustomer(Integer id) rn // TODO Auto-generated method stubrn return dao.getCustomerById(id);rn rnrn public void setCustomerDao(CustomerDAO dao) rn // TODO Auto-generated method stubrn this.dao=dao;rn rnrn[/code]

严重: Error filterStart+严重: Context startup failed due to previous errors

12-22

2011-12-22 17:55:31 org.apache.coyote.http11.Http11Protocol initrn信息: Initializing Coyote HTTP/1.1 on http-8088rn2011-12-22 17:55:31 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 828 msrn2011-12-22 17:55:32 org.apache.catalina.core.StandardService startrn信息: Starting service Catalinarn2011-12-22 17:55:32 org.apache.catalina.core.StandardEngine startrn信息: Starting Servlet Engine: Apache Tomcat/5.0.30rn2011-12-22 17:55:32 org.apache.catalina.core.StandardHost startrn信息: XML validation disabledrn2011-12-22 17:55:32 org.apache.catalina.core.StandardHost getDeployerrn信息: Create Host deployer for direct deployment ( non-jmx ) rn2011-12-22 17:55:32 org.apache.catalina.core.StandardHostDeployer installrn信息: Processing Context configuration file URL file:E:\programfile\tomcat-5.0\conf\Catalina\localhost\admin.xmlrn2011-12-22 17:55:33 org.apache.catalina.core.StandardHostDeployer installrn信息: Processing Context configuration file URL file:E:\programfile\tomcat-5.0\conf\Catalina\localhost\balancer.xmlrn2011-12-22 17:55:33 org.apache.catalina.core.StandardHostDeployer installrn信息: Processing Context configuration file URL file:E:\programfile\tomcat-5.0\conf\Catalina\localhost\manager.xmlrn2011-12-22 17:55:33 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path /chinaunicomreport from URL file:E:\programfile\tomcat-5.0\webapps\chinaunicomreportrn- ********** special char: rn2011-12-22 17:55:34 org.apache.catalina.core.StandardContext startrn严重: Error filterStartrn2011-12-22 17:55:34 org.apache.catalina.core.StandardContext startrn严重: Context startup failed due to previous errorsrn2011-12-22 17:55:34 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path /jsp-examples from URL file:E:\programfile\tomcat-5.0\webapps\jsp-examplesrn2011-12-22 17:55:34 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path from URL file:E:\programfile\tomcat-5.0\webapps\ROOTrn2011-12-22 17:55:34 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path /servlets-examples from URL file:E:\programfile\tomcat-5.0\webapps\servlets-examplesrn2011-12-22 17:55:34 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path /tomcat-docs from URL file:E:\programfile\tomcat-5.0\webapps\tomcat-docsrn2011-12-22 17:55:34 org.apache.catalina.core.StandardHostDeployer installrn信息: Installing web application at context path /webdav from URL file:E:\programfile\tomcat-5.0\webapps\webdavrn2011-12-22 17:55:34 org.apache.coyote.http11.Http11Protocol startrn信息: Starting Coyote HTTP/1.1 on http-8088rn2011-12-22 17:55:34 org.apache.jk.common.ChannelSocket initrn信息: JK2: ajp13 listening on /0.0.0.0:8009rn2011-12-22 17:55:34 org.apache.jk.server.JkMain startrn信息: Jk running ID=0 time=0/31 config=E:\programfile\tomcat-5.0\conf\jk2.propertiesrn2011-12-22 17:55:34 org.apache.catalina.startup.Catalina startrn信息: Server startup in 2734 msrnrn这是提示信息,请哪位告诉一下解决方法,谢谢rn

spring2.5 mvc的配置文件 Context [/bspr] startup failed due to previous errors

05-20

tomcat-6.0.14rn工具是MyEcplise 7.0rn我建立一个web project,名字为bsprrn建立好后,添加到运行环境里rnhttp://localhost:8010/bspr/index.jsprn可以显示出来内容:This is my JSP page. rnrnrn之后我开始配置spring mvcrn修改web.xmlrn添加一个bsprm-servlet.xmlrnrn在src下建立 一个applicationContext.xmlrnrn之后在运行,就出现rnFeb 1, 2004 5:59:36 AM org.apache.catalina.startup.HostConfig checkResourcesrnINFO: Reloading context [/bspr]rnFeb 1, 2004 5:59:36 AM org.apache.catalina.core.StandardContext stoprnINFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bspr] has not been startedrnFeb 1, 2004 5:59:39 AM org.apache.catalina.core.StandardContext listenerStartrnSEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListenerrnjava.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListenerrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3773)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)rn at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1105)rn at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)rn at java.lang.Thread.run(Unknown Source)rnFeb 1, 2004 5:59:39 AM org.apache.catalina.core.StandardContext listenerStartrnSEVERE: Skipped installing application listeners due to previous error(s)rnFeb 1, 2004 5:59:39 AM org.apache.catalina.core.StandardContext startrnSEVERE: Error listenerStartrnFeb 1, 2004 5:59:39 AM org.apache.catalina.core.StandardContext startrnSEVERE: Context [/bspr] startup failed due to previous errorsrnrnrn这样的错误了!!rnrn这个问题卡住了很长时间了,不知道什么原因rn恳请出手帮忙指点下rn严重感谢,就剩下30分了,以后有分了在给!rnrn

换一批

用myeclipse启动tomcat出现Context startup failed due to previous errors

06-16

用myeclipse启动tomcat出现Context startup failed due to previous errors错误报错信息如下:rnlog4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).rnlog4j:WARN Please initialize the log4j system properly.rnStarting service Tomcat-StandalonernApache Tomcat/4.1.31rnCatalina.start: LifecycleException: Context startup failed due to previous errorsrnLifecycleException: Context startup failed due to previous errorsrn at org.apache.catalina.core.StandardContext.start(StandardContext.java:3578)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)rn at org.apache.catalina.core.StandardService.start(StandardService.java:450)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:463)rn at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)rn at org.apache.catalina.startup.Catalina.process(Catalina.java:129)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)rnStopping service Tomcat-StandalonernCatalina.stop: LifecycleException: Coyote connector has not been startedrnLifecycleException: Coyote connector has not been startedrn at org.apache.coyote.tomcat4.CoyoteConnector.stop(CoyoteConnector.java:1296)rn at org.apache.catalina.core.StandardService.stop(StandardService.java:499)rn at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2178)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:494)rn at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)rn at org.apache.catalina.startup.Catalina.process(Catalina.java:129)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)rn----------------------------------------------------------------------------------------rn我将包删除重新加载还是出现异常

jetty报错求助Failed startup of context o.e.j.w.WebAppContext@3ecf72fd

05-30

2016-05-30 23:04:42.433:INFO::main: Logging initialized @360msrnjava.io.FileNotFoundException: .\jetty\etc\jetty.xml (系统找不到指定的路径。)rn at java.io.FileInputStream.open0(Native Method)rn at java.io.FileInputStream.open(Unknown Source)rn at java.io.FileInputStream.(Unknown Source)rn at java.io.FileInputStream.(Unknown Source)rn at org.jetty.demo.JettyCustomServer.readXmlConfig(JettyCustomServer.java:70)rn at org.jetty.demo.JettyCustomServer.(JettyCustomServer.java:45)rn at org.jetty.demo.JettyCustomServer.(JettyCustomServer.java:32)rn at org.jetty.demo.JettyServerStart.main(JettyServerStart.java:5)rn2016-05-30 23:04:42.777:INFO:oejs.Server:main: jetty-9.3.9.v20160517rn2016-05-30 23:04:43.095:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@3ecf72fd/testContext,file:///C:/Android/jetty/webRoot/,nullrnjava.nio.file.NoSuchFileException: C:\Android\jetty\jetty\etc\webdefault.xmlrn at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)rn at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)rn at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)rn at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)rn at java.nio.file.Files.newByteChannel(Unknown Source)rn at java.nio.file.Files.newByteChannel(Unknown Source)rn at java.nio.file.spi.FileSystemProvider.newInputStream(Unknown Source)rn at java.nio.file.Files.newInputStream(Unknown Source)rn at org.eclipse.jetty.util.resource.PathResource.getInputStream(PathResource.java:380)rn at org.eclipse.jetty.webapp.Descriptor.parse(Descriptor.java:54)rn at org.eclipse.jetty.webapp.WebDescriptor.parse(WebDescriptor.java:207)rn at org.eclipse.jetty.webapp.MetaData.setDefaults(MetaData.java:164)rn at org.eclipse.jetty.webapp.WebXmlConfiguration.preConfigure(WebXmlConfiguration.java:53)rn at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:483)rn at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:519)rn at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)rn at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)rn at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)rn at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)rn at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)rn at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)rn at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)rn at org.eclipse.jetty.server.Server.start(Server.java:411)rn at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)rn at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)rn at org.eclipse.jetty.server.Server.doStart(Server.java:378)rn at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)rn at org.jetty.demo.JettyCustomServer.startServer(JettyCustomServer.java:105)rn at org.jetty.demo.JettyServerStart.main(JettyServerStart.java:7)rn2016-05-30 23:04:43.098:INFO:oejs.Server:main: Started @1028msrncurrent thread:8| idle thread:8rn 求解

没有更多推荐了,返回首页