2016-12-05 260 views
1

我試圖在本地機器上運行Apache Tomcat服務器,無法從最近1天啓動服務器。我嘗試了不同的帖子來解決Stack Overflow上的這個問題,但是沒有人在我的情況下工作。無法在本地主機上運行Apache Tomcat服務器?

我嘗試下面的步驟:

  1. 安裝Java JDK和Java JRE(均爲1.8版)
  2. 安裝有相同版本的Tomcat(Tomcat的8)
  3. 設置正確的CATALINA_HOME路徑指向的Apache Tomcat目錄
  4. 運行startup.bat文件中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 

兩個錯誤encuntered是:

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

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

回答

0

看起來你有庫問題。

儘量使用最新版本的Xerces庫,

"xercesImpl.jar" and "xml-apis.jar"TOMCAT_HOME/endorsed文件夾

+0

我都放在這兩個jar文件TOMCAT_HOME/lib文件夾中,但仍然得到同樣的錯誤。請幫忙 ** TOMCAT_HOME/endorsed **目錄是什麼意思? –

相關問題