Tomcat starts reporting Error listenerStart error

Tomcat cannot be started today, and the following error is reported:

org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/******] startup failed due to previous errors

I found N many articles on the Internet, but none of them hit the spot.
Later, I found a method on a foreign website
http://grails.1312388.n4.nabble.com/Deployment-problems-td4628710.html.
I tried it and it works. The scheme is as follows.

The error reported by Tomcat is too vague, nothing is reported, only Error listenerStart is prompted. For debugging, we want to get more verbose logs. You can create a new file called logging.properties in the WEB-INF/classes directory with the following contents

handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler  
  
############################################################  
# Handler specific properties.  
# Describes specific configuration info for Handlers.  
############################################################  
  
org.apache.juli.FileHandler.level = FINE  
org.apache.juli.FileHandler.directory = ${catalina.base}/logs  
org.apache.juli.FileHandler.prefix = error-debug.  
  
java.util.logging.ConsoleHandler.level = FINE  
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter


In this way, when we start tomcat again, a more detailed log error-debug.2012-05-31.log will be generated in the logs directory.

Let's go in and see what's wrong.
The error I encountered was FileNotFoundException. There should be all kinds of errors that everyone encountered, so it is necessary to analyze the specific problems in detail.
For details on tomcat's logging documentation, please refer to http://tomcat.apache.org/tomcat-7.0-doc/logging.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326510215&siteId=291194637