• 解决tomcat一闪而过问题


    1. 环境:      jdk 1.8.0.91           windows2003           tomcat8.0
    2. 故障现象:启动tomcat 时, 一闪而过
    3. 排障步骤:  

          a) 首先是要调出错误信息:

                             i.  修改tomcat的bin目录下的启动文件startup.bat

              原内容如下:

              call "%EXECUTABLE%" start %CMD_LINE_ARGS%

              :end

          修改后如下:

              call "%EXECUTABLE%" run  %CMD_LINE_ARGS%

              :end

              pause

    保存后启动tomcat

    b)         得到如下错误信息:

    24-Aug-2016 08:33:00.836 SEVERE [main] org.apache.tomcat.util.digester.Digester.

    startElement Begin event threw exception

    java.lang.ClassNotFoundException: org.apache.catalina.core.JasperListener

    解决方法很简单:

             因为之前使用的tomcat7部署的, 现在升级到tomcat8. 但tomcat8的conf中的server.xml文件, 跟7中的略有不同. 只需要按照7中的端口号来更改8的server.xml文件即可

    下面是tomcat自带的server.xml部分

    <?xml version='1.0' encoding='utf-8'?>

    <Server port="8005" shutdown="SHUTDOWN">

      <Listener className="org.apache.catalina.startup.VersionLoggerListener" />

      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />

      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

      <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

        <Resource name="UserDatabase" auth="Container"

                  type="org.apache.catalina.UserDatabase"

                  description="User database that can be updated and saved"

                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"

                  pathname="conf/tomcat-users.xml" />

      </GlobalNamingResources>

      <Service name="Catalina">

    接下来是tomcat7的server.xml部分

    <?xml version='1.0' encoding='utf-8'?>

    <Server port="8005" shutdown="SHUTDOWN">

      <Listener className="org.apache.catalina.startup.VersionLoggerListener" />

      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

      <Listener className="org.apache.catalina.core.JasperListener" />  注释这行

      <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />

      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

      <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

        <Resource name="UserDatabase" auth="Container"

                  type="org.apache.catalina.UserDatabase"

                  description="User database that can be updated and saved"

                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"

                  pathname="conf/tomcat-users.xml" />

      </GlobalNamingResources>

    c)第二种故障Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/ca
    talina/startup/Bootstrap : Unsupported major.minor version 51.0

    JDK版本错误, 重新编译或者使用低版本的tomcat

    最后不要忘记把startup.bat更改回来

  • 相关阅读:
    cisco route 831 IOS 备份升级ISO
    活动目录灾难恢复计划
    转载:IPsec的故障诊断与维修
    IPSEC结构
    诺基亚手机的安全保护。如何使你的手机丢失,被盗后依然安全。
    windows xp 同步故障:Unable to merge offline changes on \\ server_name \ share_name . The parameter is incorrect
    Google chart
    IPSEC的NAT兼容性
    Tom围棋(弈城围棋)运行错误:当前运行的版本是系统无法识别的版本
    IPSec NATT
  • 原文地址:https://www.cnblogs.com/wxylog/p/5806373.html
Copyright © 2020-2023  润新知