6
我試圖去適應一些舊的生成腳本與RPM安裝的Tomcat 6的運行,我運行到以下幾點:
java.lang.IllegalArgumentException: Document base /var/lib/tomcat6/webapps/host-manager does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4086)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4255)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
這並不奇怪,因爲Tomcat是不是/var/lib/tomcat6
,它在/usr/share/tomcat6
。當我尋找在那裏這可能是從,所有我覺得未來是在一個文件中的以下稱爲host-manager.xml
:
<Context docBase="${catalina.home}/webapps/host-manager"
privileged="true" antiResourceLocking="false" antiJARLocking="false">
</Context>
現在,我有$CATALINA_HOME
設置爲/usr/share/tomcat6
理所應當,而且也給/var/lib
任何地方的任何引用在我的網絡應用程序(包括配置)或我的Tomcat 6安裝,據我所知。那麼什麼是${catalina.home}
,/var/lib/tomcat6
如何取代它呢?
我正在用catalina.sh啓動它。沒有深入瞭解它爲什麼沒有使用環境變量,但是通過安裝tomcat6-admin-webapps RPM解決了這個特殊問題,它將這些文件放在/ var/lib中它正在尋找它們的地方。 – 2012-03-30 22:47:23