[Tomcat] severe: Context [/grouponAdminWeb] startup failed due to previous errors

Source: Internet
Author: User
Tags log log

1 tomcat 6600 startup Error
[Root @ localhost webapps] # sh/usr/local/apache-tomcat-6.0.37_6600/bin/startup. sh
Using CATALINA_BASE:/usr/local/apache-tomcat-6.0.37_6600
Using CATALINA_HOME:/usr/local/apache-tomcat-6.0.37_6600
Using CATALINA_TMPDIR:/usr/local/apache-tomcat-6.0.37_6600/temp
Using JRE_HOME:/usr/java/jdk1.6.0 _ 45
Using CLASSPATH:/usr/local/apache-tomcat-6.0.37_6600/bin/bootstrap. jar
Using CATALINA_PID:/var/tomcat/6600.pid
Existing PID file found during start.
Removing/clearing stale PID file.
The/var/tomcat/6600. pid already exists, so loading fails. Stop tomcat and check the tomcat Process


2. delete an existing 6600. pid File
[Root @ localhost webapps] # ps-eaf| grep 6600
Root 10446 4972 0 00:00:00 pts/2 grep 6600
[Root @ localhost webapps] # more/var/tomcat/6600.pid
10180
[Root @ localhost webapps] #
[Root @ localhost webapps] # ll/var/tomcat/6600.pid
-Rw-r -- 1 root 6 05-03/var/tomcat/6600.pid


[Root @ localhost webapps] # rm-rf/var/tomcat/6600.pid
[Root @ localhost webapps] #


3. Restart and report an error. Check the error log as follows:
Tail-n 1000/usr/local/apache-tomcat-6.0.37_6600/logs/catalina. out
15:18:29 org. apache. catalina. loader. WebappClassLoader clearReferencesThreads
Severe: The web application [/grouponAdminWeb] appears to have started a thread named [Thread-197] but has failed to stop it. This is very likely to create a memory leak.
15:18:29 org. apache. catalina. loader. WebappClassLoader clearReferencesThreads
Severe: The web application [/grouponAdminWeb] appears to have started a thread named [Thread-198] but has failed to stop it. This is very likely to create a memory leak.
......
15:15:41 org. apache. catalina. startup. HostConfig deployWAR
Information: Deploying web application archive grouponAdminWeb. war
SLF4J: This version of SLF4J requires log4j version 1.2.12 or later. See also http://www.slf4j.org/codes.html#log4j_version
15:15:44 org. apache. catalina. core. StandardContext start
Severe: Error listenerStart
15:15:44 org. apache. catalina. core. StandardContext start
Severe: Context [/grouponAdminWeb] startup failed due to previous errors


Here we can see that the web application grouponAdminWeb fails to deploy on the tomcat container. Why does it fail?


4. Why did the deploy application fail?
Ask the Application Designer To Go To The localhost.2014-05-03.log file in the same directory.
Tail-n 1000/usr/local/apache-tomcat-6.0.37_6600/logs/localhost.2014-05-03.log
The following error message is displayed:
15:15:41 org. apache. catalina. core. StandardContext listenerStart
Severe: Exception sending context initialized event to listener instance of class org. springframework. web. util. Log4jConfigListener
Java. lang. illegalStateException: Web app root system property already set to different value: 'grouponweb. root '= [/usr/local/apache-tomcat-6.0.37_6600/webapps/grouponWeb/] instead of [/usr/local/apache-tomcat-6.0.37_6600/webapps/grouponAdminWeb/]-Choose unique values for the 'webapprootkey' context-param in your web. xml files!
At org. springframework. web. util. WebUtils. setWebAppRootSystemProperty (WebUtils. java: 148)
At org. springframework. web. util. Log4jWebConfigurer. initLogging (Log4jWebConfigurer. java: 117)
At org. springframework. web. util. Log4jConfigListener. contextInitialized (Log4jConfigListener. java: 45)
At org. apache. catalina. core. StandardContext. listenerStart (StandardContext. java: 4206)
At org. apache. catalina. core. StandardContext. start (StandardContext. java: 4705)
At org. apache. catalina. core. ContainerBase. addChildInternal (ContainerBase. java: 799)
At org. apache. catalina. core. ContainerBase. addChild (ContainerBase. java: 779)
At org. apache. catalina. core. StandardHost. addChild (StandardHost. java: 601)
At org. apache. catalina. startup. HostConfig. deployWAR (HostConfig. java: 943)
At org. apache. catalina. startup. HostConfig. deployWARs (HostConfig. java: 778)
At org. apache. catalina. startup. HostConfig. deployApps (HostConfig. java: 504)
At org. apache. catalina. startup. HostConfig. start (HostConfig. java: 1317)
At org. apache. catalina. startup. HostConfig. lifecycleEvent (HostConfig. java: 324)
At org. apache. catalina. util. LifecycleSupport. fireLifecycleEvent (LifecycleSupport. java: 142)
At org. apache. catalina. core. ContainerBase. start (ContainerBase. java: 1065)
At org. apache. catalina. core. StandardHost. start (StandardHost. java: 840)
At org. apache. catalina. core. ContainerBase. start (ContainerBase. java: 1057)
At org. apache. catalina. core. StandardEngine. start (StandardEngine. java: 463)
At org. apache. catalina. core. StandardService. start (StandardService. java: 525)
At org. apache. catalina. core. StandardServer. start (StandardServer. java: 754)
At org. apache. catalina. startup. Catalina. start (Catalina. java: 595)
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: 289)
At org. apache. catalina. startup. Bootstrap. main (Bootstrap. java: 414)
15:15:41 org. apache. catalina. core. ApplicationContext log
Information: Initializing Spring root WebApplicationContext


5 to see the error message, is the configuration file error, to modify the WEB-INF under the web. xml
Vim/usr/local/apache-tomcat-6.0.37_6600/webapps/grouponAdminWeb/WEB-INF/web. xml
Change the key value of GrouponWeb. root from GrouponWeb to GrouponAdminWeb, as shown below:

......<context-param>        <param-name>webAppRootKey</param-name>        <param-value>GrouponAdminWeb.root</param-value>    </context-param>......

Restart tomcat or reload the GrouponAdminWeb application.




6. view the latest tomcat startup log as follows:
[Root @ localhost WEB-INF] # tail-n 200/usr/local/apache-tomcat-6.0.37_6600/logs/catalina. out
Information: Initializing Coyote HTTP/1.1 on http-6600
15:18:53 org. apache. catalina. startup. Catalina load
Information: Initialization processed in 472 MS
15:18:53 org. apache. catalina. core. StandardService start
Information: Starting service Catalina
15:18:53 org. apache. catalina. core. StandardEngine start
Information: Starting Servlet Engine: Apache Tomcat/6.0.37
15:18:53 org. apache. catalina. startup. HostConfig deployDescriptor
Information: Deploying configuration descriptor manager. xml
15:18:53 org. apache. catalina. startup. HostConfig deployWAR
Information: Deploying web application archive grouponWeb. war
SLF4J: This version of SLF4J requires log4j version 1.2.12 or later. See also http://www.slf4j.org/codes.html#log4j_version
================
15:18:58 org. apache. catalina. startup. HostConfig deployWAR
Information: Deploying web application archive grouponAdminWeb. war
SLF4J: This version of SLF4J requires log4j version 1.2.12 or later. See also http://www.slf4j.org/codes.html#log4j_version
================
15:19:02 org. apache. catalina. startup. HostConfig deployWAR
Information: Deploying web application archive grouponService. war
15:19:04 org. apache. catalina. startup. HostConfig deployDirectory
Information: Deploying web application directory ROOT
15:19:04 org. apache. coyote. http11.Http11Protocol start
Information: Starting Coyote HTTP/1.1 on http-6600
15:19:04 org. apache. jk. common. ChannelSocket init
Information: JK: ajp13 listening on/0.0.0.0: 6609
15:19:04 org. apache. jk. server. JkMain start
Description: Jk running ID = 0 time = 0/13 config = null
15:19:04 org. apache. catalina. startup. Catalina start
Information: Server startup in 10955 MS

Conclusion: The web application loading error of the tomcat container should be reported, in addition to viewing the catalina. log, the localhost.2014-05-03.log log information should also be viewed.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.