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 

如下图的目录。

Tomcat 启动没反应 报错 org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due_第1张图片

三、解决效果

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

Tomcat 启动没反应 报错 org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due_第2张图片

 

 

 

你可能感兴趣的:(问题)