異常 之 java.lang.IllegalArgumentException:Document base *** does not exist or is not a readable
這是由于在webapps里面將項目刪除,卻沒有在其它相應的工作目錄刪除
確定3點:
1.該項目的War文件從***\apache-tomcat-6.0.16\webapps 移出;
2.該項目的某些配置從 ***apache-tomcat-6.0.16\work\Catalina\localhost 移除;
3.該項目的配置文件,目錄: ***\apache-tomcat-6.0.16\conf\Catalina\localhost移除。
多個tomcat運行在一臺機器上
將tomcat的server.xml中的
shutdown端口
http端口
AJP端口
再運行即可,如果還不行,可以在startbat最后加個pause看看是不是jre等的問題
一個tomcat跑多個實例
看到網上寫有兩種方式,一種為配置多個service,一種為一個service配置多個connector
<Server>
<Service name="aaa">
? ? <Connector port="8080" maxThreads="150" minSpareThreads="10" ? maxSpareThreads="75"
? ? ? ? ? ? ? ?enableLookups="false" redirectPort="38443" acceptCount="100"
? ? ? ? ? ? ? ?debug="9" connectionTimeout="20000"
? ? ? ? ? ? ? ?disableUploadTimeout="true" />
</Service>
<Service name="bbb">
? ? <Connector port="28080"
? ? ? ? ? ? ? ?maxThreads="150" minSpareThreads="10" maxSpareThreads="75"
? ? ? ? ? ? ? ?enableLookups="false" redirectPort="48443" acceptCount="100"
? ? ? ? ? ? ? ?debug="9" connectionTimeout="20000"
? ? ? ? ? ? ? ?disableUploadTimeout="true" />
</Service>
</Server>
<Service name="Catalina2"> ?
? ? <Connector port="8081" ?
? ? ? ? ? ? ? ?maxThreads="150" minSpareThreads="25" maxSpareThreads="75" ?
? ? ? ? ? ? ? ?enableLookups="false" redirectPort="8443" acceptCount="100" ?
? ? ? ? ? ? ? ?debug="0" connectionTimeout="20000" ??
? ? ? ? ? ? ? ?disableUploadTimeout="true" /> ?
? ? <Connector port="8010" ??
? ? ? ? ? ? ? ?enableLookups="false" redirectPort="8443" debug="0" ?
? ? ? ? ? ? ? ?protocol="AJP/1.3" /> ?
? ? <Engine name="Catalina" defaultHost="localhost" debug="0"> ?
? ? ? <Logger className="org.apache.catalina.logger.FileLogger" ?
? ? ? ? ? ? ? prefix="catalina2_log." suffix=".txt" ?
? ? ? ? ? ? ? timestamp="true"/> ?
? ? ? <Realm className="org.apache.catalina.realm.UserDatabaseRealm" ?
? ? ? ? ? ? ? ? ?debug="0" resourceName="UserDatabase"/> ?
? ? ? <Host name="localhost" debug="0" appBase="webapps2" ?
? ? ? ?unpackWARs="true" autoDeploy="true" ?
? ? ? ?xmlValidation="false" xmlNamespaceAware="false"> ?
? ? ? ? <Logger className="org.apache.catalina.logger.FileLogger" ?
? ? ? ? ? ? ? ? ?directory="logs" ?prefix="localhost2_log." suffix=".txt" ?
? ? ? ? ? ? timestamp="true"/> ?
? ? ? </Host> ?
? ? </Engine> ?
? </Service> ?
REFERENCES: http://www.cnblogs.com/skyme/archive/2011/06/28/2091974.html
http://wenku.baidu.com/view/f0285a27192e45361066f510.html
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
