developer tip

Tomcat 시작 로그-심각 : 오류 filterStart 스택 추적을 얻는 방법?

optionbox 2020. 8. 26. 07:49
반응형

Tomcat 시작 로그-심각 : 오류 filterStart 스택 추적을 얻는 방법?


Tomcat을 시작하면 다음 오류가 발생합니다.

Jun 10, 2010 5:17:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jun 10, 2010 5:17:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/mywebapplication] startup failed due to previous errors

Tomcat의 로그에 스택 추적이 포함되지 않는 것이 이상해 보입니다. 누군가 이와 같은 오류에 대한 스택 추적을 얻기 위해 Tomcat에서 로깅을 늘리는 방법에 대한 제안이 있습니까?


Tomcat이 생성 하는 localhost_yyyy_mm_dd.logOR localhost.yyyy-mm-dd.log로그를 확인합니다. 일반적으로 해당 유형의 정보를 저장합니다. 전체 스택 트레이스가 표준 출력으로 덤프 될 것으로 기대하지 않습니다.


다음 내용으로 WEB-INF / classes에 logging.properties라는 파일을 만듭니다.

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

Tomcat은 스택 추적을 기록하지만 Tomcat이 IDE에서 시작될 때 로그 파일의 위치가 항상 명확하지는 않습니다. IntelliJ에서 시작하면 CATALINA_BASE이로 설정되고 ${home}/.IntelliJIdea10/system/tomcat/Unnamed_r6-idea로그 파일은 [CATALINA_BASE]/logs.

로그를 보려면 로그 파일을 찾거나 [CATALINA_HOME]/conf/logging.propertiestomcat 로거 출력을 콘솔로 보내도록 편집하십시오 . 아래에서 기본 tomcat 구성에 두 번째 핸들러를 추가했습니다.

 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

이제 IntelliJ 출력에 전체 스택 추적이 나타납니다.

 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)
 . . .

파일을 복사해야합니다

cp /path/to/solr/example/lib/ext/* /path/to/tomcat/lib
cp /path/to/solr/example/resources/* /path/to/tomcat/lib // or inside extracted solr

그런 다음 바람둥이 다시 시작하십시오.


애플리케이션이 Tomcat과 다른 JRE로 컴파일되었을 수 있습니다.

확인 java -version동일한 버전의 코드를 컴파일 한 후 서버에합니다. Eclipse 표준 JRE가 1.6이고 Tomcat이 1.5를 사용했기 때문에 오류가 발생했습니다. 작동하지 않습니다.


CentOS 6 및 Solr 4.4.0

이 오류를 해결하기 위해 일부 lib 파일을 작성해야했습니다.

cp ~/solr-4.4.0/example/lib/ext/* /usr/share/tomcat6/lib/

일반적으로 localhost. [date] .log에 문제에 대한 정보가 있습니다. 그러나 때로는이 로그에 아무것도 없습니다. 이것은 프로젝트의 구성이 엉망인 경우에 발생할 수 있습니다 (여러 개발자가 오랫동안 작업하고 각자 자신에게서 무언가를 추가했습니다). 나는 로그에 어떤 정보도없이이 문제에 직면했다. 보다 빠르고 강력한 접근 방식 :

  1. web.xml에서 문제를 일으킬 수있는 모든 것을 제거하십시오. 태그를 제외한 모든 것을 제거 할 수도 있습니다. 여전히 응용 프로그램을 배포 할 수없는 경우 계속하십시오.

  2. WEB-INF / classes에서 모든 * .xml 설명자를 제거하십시오. 응용 프로그램을 배포 할 수없는 경우 계속하십시오.

  3. 전쟁에서 찾을 수있는 모든 로깅 구성을 제거합니다 (logging.properties, log4j.properties). 배포 해보십시오. 이 단계에서 더 많은 정보를 제공하는 오류가 발생했지만 배포는 여전히 실패했습니다.

이 오류를 검색 한 후 프로젝트에 이전 버전의 xerces가 포함되어 있음을 발견했습니다.이 버전은 Tomcat의 버전 (최신 버전)과 충돌하고 배포 할 애플리케이션이 아닙니다. 웹 응용 프로그램에서 xerces를 업그레이드 한 후 모든 것이 잘되었습니다.


Tomcat에 대한 log4j 로깅을 설정하는 것은 매우 간단합니다. 다음은 http://tomcat.apache.org/tomcat-5.5-doc/logging.html 에서 인용되었습니다 .

  1. 다음 내용으로 log4j.properties라는 파일을 만들고 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
    
  2. Log4J (v1.2 이상)를 다운로드하고 log4j jar를 $ CATALINA_HOME / common / lib에 배치합니다.

  3. Commons Logging을 다운로드하고 log4j jar와 함께 $ CATALINA_HOME / common / lib에 commons-logging-xyzjar (commons-logging-api-xyzjar 아님)을 배치합니다.
  4. Tomcat 시작

You might also want to have a look at http://wiki.apache.org/tomcat/FAQ/Logging


if anyone is getting error like SEVERE: Error filterStart Apr 29, 2013 4:49:20 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/TraceMW] startup failed due to previous errors

then please check whether your tomcat/lib directory contains cors-filter-1.5.jar or not. if you dot have u will get above error and ur application will not be available.

So, i just managed to copy the jar file from other tomcat folder and i didnt get the above mentioned error later.


I too got the same error and struggled a lot in fixing this issue. Spent quiet a bit time in searching Google and found the following solution and my issue got resolved.

the issue was due to, missing Struts2 Libraries in the deployment path. Most of the folks may put the libraries for compilation and tend to forget to attach required libraries for run-time. So I added the same libraries in the web deployment assembly, and the issue was OFF.


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


Just wanted to contribute after spending the last hour on a nearly identical problem. My solution was that somehow our applicatons .jar was corrupted, so placing the jar from our dev server provided a fix.


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.


This did the trick for me:Just remove all the libraries and then compile and run. It would prompt their are errors in your project confirm. Rerun the project after applying the libraries.


Generally Server JDK version will be lower than the deployed application (built with higher jdk version)


Run Following command to show catalina logs on the terminal---

sh start-camunda.sh; tail -f server/apache-tomcat-8.0.24/logs/catalina.out

참고URL : https://stackoverflow.com/questions/3016808/tomcat-startup-logs-severe-error-filterstart-how-to-get-a-stack-trace

반응형