Tomcat catalibnna.bat start闪退问题 Error starting static Resources java.lang.IllegalArgumentException:

1 出现“catalibnna.bat start”闪退,不要怕,先找问题

输入: 在命令行中输入:catalibnna.bat run 会在出现错误后停止,而不是退出,这样我们可以看到问题,方便解决

CATALINA_HOME,JRE_HOME 保证路径正确就可以(这两个路径不正确,也会闪退)

C:\Users\Administrator\Desktop\apache-tomcat-7.0.63-cas\bin>catalina.bat run

C:\Users\Administrator\Desktop\apache-tomcat-7.0.63-cas\bin>set JAVA_OPTS=-Xms51
2m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m
Using CATALINA_BASE:   "C:\Users\Administrator\Desktop\apache-tomcat-7.0.63-cas"

Using CATALINA_HOME:   "C:\Users\Administrator\Desktop\apache-tomcat-7.0.63-cas"

Using CATALINA_TMPDIR: "C:\Users\Administrator\Desktop\apache-tomcat-7.0.63-cas\
temp"
Using JRE_HOME:        "C:\Program Files\Java\jre7"
Using CLASSPATH:       "C:\Users\Administrator\Desktop\apache-tomcat-7.0.63-cas\
bin\bootstrap.jar;C:\Users\Administrator\Desktop\apache-tomcat-7.0.63-cas\bin\to
mcat-juli.jar"

2 上错误

严重: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Users\Administrator\Desktop
\apache-tomcat-7.0.63-cas\webapps\cas does not exist or is not a readable direct
ory
        at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.
java:136)
        at org.apache.catalina.core.StandardContext.resourcesStart(StandardConte
xt.java:5146)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5333)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1574)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1564)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

一月 09, 2019 3:57:20 下午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException:
 Failed to start component [StandardEngine[Catalina].StandardHost[localhost].Sta
ndardContext[]]
        at java.util.concurrent.FutureTask.report(Unknown Source)
        at java.util.concurrent.FutureTask.get(Unknown Source)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
va:1122)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
:819)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1574)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1564)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [St
andardEngine[Catalina].StandardHost[localhost].StandardContext[]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        ... 6 more
Caused by: org.apache.catalina.LifecycleException: Error in resourceStart()
        at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5334)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 6 more

。
。
。
。
。(剩下错误为了篇幅不写了)

3 原因是什么?删除CAS(我自己的项目名称):C:\Users\lele\Desktop\apache-tomcat-7.0.63-cas\work\Catalina\localhost中的文件不干净,没有删除相应配置文件。

打开tomcat安装目录中 /conf/server.xml文件 发现:有一个cas在那里存在着。。。

<Context docBase="cas" path="" workDir="work/Catalina/localhost/cas" reloadable="true"/>

注释上面这句话(你的可能是其他的项目),然后重新启Tomcat就OK了。 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值