Tomcat启动报错误,打开详细debug

今天tomcat启动加载项目时,报以下错:

09-Nov-2016 11:43:35.815 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details w ill be found in the appropriate container log file 41
09-Nov-2016 11:43:35.817 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/demo] startup failed due to previous errors

怎么都解决不了,tomcat报的错又太简略啥都看不出。

用以下方法可以让tomcat打出详细错误信息

可以在WEB-INF/classes目录下新建一个文件叫logging.properties

内容为:

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.SimpleFor
matter  

我们再启动tomcat时,就会在logs目录下生成一个更详细的日志error-debug.*.log。
既可以看到详细的错误信息,然后再根据错误信息修改就好了。

转载于:https://www.cnblogs.com/A-yes/p/9894173.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值