2

I was trying to deploy a war file via tomcat manager 6. Once deployed get always the same error : FAIL - Application at context path /App could not be started

The war file is under apache-tomcat-6.0.0/webapps folder.

I was googling and tried different options like :

removing apache-tomcat-6.0.0/work/Catalina/localhost folder and also apache-tomcat-6.0.0/webapps/App restarting the server and redeploying again.

As I could see in the catalinalog file :

INFO: Deploying web application archive App.war
 3:32:47 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
 2012 3:32:47 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/App] startup failed due to previous errors
 2012 3:32:50 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
 2012 3:32:50 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/App] startup failed due to previous errors

Any ideas ?

Mas
  • 111
  • 1
  • 3
  • 7

1 Answers1

0

Add a “log4j.properties” file under ‘/WEB-INF/classes’ directory inside your WAR to help debug which one of the listeners is throwing this error.

This holds true for Tomcat versions < 6.0

In Tomcat 6 or above, the default logger is the”java.util.logging” logger and not Log4J. So if you are trying to add a “log4j.properties” file – this will NOT work. The Java utils logger looks for a file called “logging.properties” as stated here: http://tomcat.apache.org/tomcat-6.0-doc/logging.html

So to get to the debugging details create a “logging.properties” file under your”/WEB-INF/classes” folder of your WAR and you’re all set.

And now when you restart your Tomcat, you will see all of your debugging in it’s full glory!!!

Sample logging.properties file:

org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler

and you will most likely see a “ClassNotFound” exception.

Sai Hegde
  • 623
  • 5
  • 12
  • Thanks Sai for your response. In fact I have created the logging.properties file under /WEB-INF/classes folder with the content above and restarted tomcat6 but it still showing the same logging details. No"ClassNotFound" figured out. !!! is there any option to add for such a file for extending the logging details ? – Mas Oct 10 '12 at 14:44
  • How about changing the log level to the following--- org.apache.catalina.core.ContainerBase.[Catalina].level = FINEST – Sai Hegde Oct 16 '12 at 23:19