When I start Tomcat I get the following error:
Jun 10, 2010 5:17:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jun 10, 2010
Tomcat does log the stacktrace, but it is not always clear where the log files are, when tomcat is started from an IDE. When I start it from IntelliJ, CATALINA_BASE
is set to ${home}/.IntelliJIdea10/system/tomcat/Unnamed_r6-idea
, and the log files are in in [CATALINA_BASE]/logs
.
To see the logs, either locate the log files, or edit [CATALINA_HOME]/conf/logging.properties
to direct tomcat logger output to console. Below I added a second handler to the default tomcat configuration:
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
Now the full stacktrace appears in the IntelliJ output:
Dec 27, 2011 12:02:45 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter filterChainProxy
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'filterChainProxy' is defined at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
. . .
Usually there is an information about the problem in localhost.[date].log. But sometimes there is nothing in this log. This can happen if there is messed configuration of the project (several developers worked on it for a long time and each added something from himself). I faced this problem WITHOUT any information in log. Rather fast and robust approach:
Try to remove everything which can cause any problem from web.xml. You even can remove everything except tag. If application still cannot be deployed - go on.
Remove every *.xml descriptor from WEB-INF/classes. If application cannot be deployed - go on.
Remove all logging configuration you can find in your war (logging.properties, log4j.properties). Try to deploy. At this step I've got more informative error, but deployment still failed.
After googling for this error I found out that project included old version of xerces, which clashed with Tomcat's version (which was newer) and didn't the application to be deployed. After upgrade of xerces in web-application everything became fine.
I had a similar issue. Renato's tip worked for me. I used a older version of java class files (under WEB-INF/classes folder) and the problem disappeared. So, it should have been the compiler version mismatch.
In CentOS 6 and Solr 4.4.0
I had to comp some lib files to get this error addressed
cp ~/solr-4.4.0/example/lib/ext/* /usr/share/tomcat6/lib/
I got the same issue, unable to start the application once it is deployed in tomcat. But, once I copy the Struts set of jars into CATALINA_HOME\lib (Tomcat dir) directory it is resolved. You don't need to have these jars in your WEB_INF\lib but you need to have them in your Build Path.
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
freemarker-2.3.16.jar
javassist-3.11.0.GA.jar
struts2-convention-plugin-2.2.1.jar
struts2-core-2.2.1.jar
xwork-core-2.2.1.jar
Setting up log4j logging for Tomcat is pretty simple. The following is quoted from http://tomcat.apache.org/tomcat-5.5-doc/logging.html :
Create a file called log4j.properties with the following content and save it into common/classes.
log4j.rootLogger=DEBUG, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/tomcat.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
Download Log4J (v1.2 or later) and place the log4j jar in $CATALINA_HOME/common/lib.
You might also want to have a look at http://wiki.apache.org/tomcat/FAQ/Logging