Tomcat 启动没反应 报错 org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due

 一、问题描述

运行项目,没有任何反应。访问http://localhost:8080   显示404

找不到 localhost 的网页

找不到与以下网址对应的网页:http://localhost:8080/

HTTP ERROR 404

 

IDEA运行环境,Spring+Struts2+Hibernate,运行项目报错

 

后台输出Output显示以下错误。

11-Jan-2019 21:48:50.590 涓ラ噸 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

11-Jan-2019 21:48:50.592 涓ラ噸 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors

[2019-01-11 09:48:50,670] Artifact PersonalBlog3.0:war exploded: Error during artifact deployment. See server log for details.

11-Jan-2019 21:48:55.330 淇℃伅 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Software\databases\idea\apache-tomcat-8.5.37\webapps\manager]

11-Jan-2019 21:48:55.416 淇℃伅 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Software\databases\idea\apache-tomcat-8.5.37\webapps\manager] has finished in [86] ms

 

11-Jan-2019 21:48:50.590 涓ラ噸 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

11-Jan-2019 21:48:50.592 涓ラ噸 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors

[2019-01-11 09:48:50,670] Artifact PersonalBlog3.0:war exploded: Error during artifact deployment. See server log for details.

11-Jan-2019 21:48:55.330 淇℃伅 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Software\databases\idea\apache-tomcat-8.5.37\webapps\manager]

11-Jan-2019 21:48:55.416 淇℃伅 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Software\databases\idea\apache-tomcat-8.5.37\webapps\manager] has finished in [86] ms

二、以下解决问题

那么,可以先配置一下日志,这类错误主要是缺少日志提示配置,并不是项目没有错误。

在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.SimpleFormatter 
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 

如下图的目录。

三、解决效果

然后根据异常解决问题就可以了。如下图,提示多了。

 

 

 

评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

byzf

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值