您当前的位置: 首页 >  ar

小志的博客

暂无认证

  • 1浏览

    0关注

    1217博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

intellij IDEA运行web程序出现错误Error listenerStart

小志的博客 发布时间:2019-07-29 21:00:54 ,浏览量:1

报错如下:
18-Sep-2019 02:04:03.023 SEVERE [localhost-startStop-1] 
org.apache.catalina.core.StandardContext.startInternal Error listenerStart
18-Sep-2019 2:04:03.096 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.startInternal Context [/api] 
startup failed due to previous errors

出现上述问题,并没有明确给出错误到底出现在哪里。

解决方式:

1、在工程目录WEB-INFO/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.SimpleFormatter 

在这里插入图片描述

2、重新构建和运行web项目,在tomcat下的logs文件夹中会生成error-debug开头的日志文件,改日志会具体给出报错原因

  • 本人是因为mysql服务端版本不匹配造成的。
  • mysql服务端安装的6.0版本,重新安装了5.5版本,问题搞定。

参考:https://blog.csdn.net/seizen91/article/details/52577117

关注
打赏
1661269038
查看更多评论
立即登录/注册

微信扫码登录

0.0421s