无法在我的localhost上运行Apache Tomcat服务器?

时间:2016-12-05 09:48:15

标签: java eclipse apache tomcat tomcat8

我正在尝试在本地计算机上运行Apache Tomcat服务器,并且无法从最近1天启动服务器。我尝试了不同的帖子来解决Stack Overflow上的这个问题,但在我的情况下没有一个工作。

我尝试了以下步骤:

  1. 安装Java JDK和Java JRE(均为1.8版)
  2. 使用相同版本(Tomcat 8)安装Tomcat
  3. 设置指向Apache Tomcat目录的正确CATALINA_HOME路径
  4. startup.bat文件夹
  5. 中运行Apache Tomcat/bin文件

    在运行startup.bat文件时,我在日志文件中收到以下错误:

    04-Dec-2016 22:30:59.501 SEVERE [main] org.apache.catalina.startup.Catalina.load Catalina.start
    org.apache.catalina.LifecycleException: Failed to initialize component [StandardServer[8005]]
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:603)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
    Caused by: org.w3c.dom.ls.LSException: java.lang.NullPointerException
        at org.apache.xml.serialize.DOMSerializerImpl.writeToString(Unknown Source)
        at org.apache.catalina.core.JreMemoryLeakPreventionListener.lifecycleEvent(JreMemoryLeakPreventionListener.java:426)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:388)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:101)
    ... 8 more
    

    两个错误包括:

    org.apache.catalina.startup.Catalina.load Catalina.start
    org.apache.catalina.LifecycleException: Failed to initialize component
    

    org.w3c.dom.ls.LSException: java.lang.NullPointerException
    

1 个答案:

答案 0 :(得分:0)

看起来你有图书馆问题。

尝试使用最新版本的Xerces库,

"xercesImpl.jar" and "xml-apis.jar"放入TOMCAT_HOME/endorsed文件夹