ben*_*rre 95 java logging tomcat
当我启动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
Run Code Online (Sandbox Code Playgroud)
Tomcat的日志不包含堆栈跟踪似乎很奇怪.是否有人建议如何增加Tomcat中的日志记录以获取此类错误的堆栈跟踪?
mat*_*t b 137
检查Tomcat创建的localhost_yyyy_mm_dd.logOR localhost.yyyy-mm-dd.log日志,这些日志通常存储该类型的信息.我不希望将完整的堆栈跟踪转储到标准输出.
Mic*_*oon 80
在WEB-INF/classes中创建一个名为logging.properties的文件,其中包含以下内容:
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler
Run Code Online (Sandbox Code Playgroud)
Ass*_*lov 21
Tomcat会记录堆栈跟踪,但是当从IDE启动tomcat时,日志文件的位置并不总是很清楚.当我从IntelliJ启动时,CATALINA_BASE设置为${home}/.IntelliJIdea10/system/tomcat/Unnamed_r6-idea,并且日志文件位于[CATALINA_BASE]/logs.
要查看日志,请找到日志文件,或编辑[CATALINA_HOME]/conf/logging.properties以将tomcat logger输出定向到控制台.下面我为默认的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
Run Code Online (Sandbox Code Playgroud)
现在,完整的堆栈跟踪出现在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)
. . .
Run Code Online (Sandbox Code Playgroud)
你需要复制文件
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
Run Code Online (Sandbox Code Playgroud)
然后重启 tomcat
小智 5
也许您的应用程序使用与Tomcat不同的JRE进行编译.
检查java -version您的服务器,然后使用相同的版本编译您的代码.我有错误,因为我的Eclipse标准JRE是1.6而Tomcat使用1.5 - 这不起作用.
| 归档时间: |
|
| 查看次数: |
123718 次 |
| 最近记录: |