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黑窗口会给出具体的错误信息,就可以直接排查咯。

  • 相关阅读:
    83. Remove Duplicates from Sorted List
    35. Search Insert Position
    96. Unique Binary Search Trees
    94. Binary Tree Inorder Traversal
    117. Populating Next Right Pointers in Each Node II
    116. Populating Next Right Pointers in Each Node
    111. Minimum Depth of Binary Tree
    169. Majority Element
    171. Excel Sheet Column Number
    190. Reverse Bits
  • 原文地址:https://www.cnblogs.com/hanjun0612/p/14636881.html
Copyright © 2011-2022 走看看