zoukankan      html  css  js  c++  java
  • 遇到“org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start.”怎么办

    转载:https://blog.csdn.net/weixin_44082011/article/details/86646920

    前提:

    服务器的tomcat里原有两个项目,启动没有问题,都可以访问。不修改这两个项目任何地方的情况下,新加了一个项目。启动报:org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details
    will be found in the appropriate container log file。新项目可以访问,之前的项目只能访问一个,另一个会报404。

    排查: 

    一个或多个监听文件启动失败,但并没有具体说哪个文件失败。另外,访问不了的那个项目并没有进行任何的修改。把访问出问题的项目拷贝到本地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.SimpleFormatter  

    重新启动tomcat。tomcat黑窗口会给出具体的错误信息,就可以直接排查咯。

  • 相关阅读:
    Centos7 安装配置Elasticsearch
    单例模式
    Eclipse上部署maven项目
    单点登录
    各eclipse插件的作用
    eclipse中安装Subclipse插件
    往idea中导入已有的web项目
    maven 项目部署
    【转帖】算法刷题网站
    混淆矩阵-MATLAB代码详解
  • 原文地址:https://www.cnblogs.com/hanjun0612/p/14636881.html
Copyright © 2011-2022 走看看