java.lang.IllegalArgumentException和org.apache.catalina.LifecycleException
2015-03-14 00:00
435 查看
问题:
No.1: java.lang.IllegalArgumentException: Document base C:\Users\hanrong\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Struts2_test1 does not exist or is not a readable directory
严重: Exception starting Context with name [/Struts2_test1]
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Struts2_test1]]
No.2: java.lang.IllegalArgumentException: Document base C:\Users\hanrong\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Struts2_test2 does not exist or is not a readable directory
严重: Exception starting Context with name [/Struts2_test2]
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Struts2_test2]]
问题原因:
在学习使用 Eclipse 开发 Java Web 应用程序时,常常会拷贝旧项目然后改个名字作为新的项目。这样直接运行新的项目则会发生以上的错误。因为旧项目和新项目的 Context root 是一样的,当它们同时被 Tomcat 服务器加载时,由于两个项目处于同一个虚拟主机(Host)当中,就会发生冲突了。
解决方法:
修改其中一个项目工程的 Context root(如下图所示)。
![](http://static.oschina.net/uploads/img/201503/14174456_cvCp.png)
No.1: java.lang.IllegalArgumentException: Document base C:\Users\hanrong\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Struts2_test1 does not exist or is not a readable directory
严重: Exception starting Context with name [/Struts2_test1]
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Struts2_test1]]
No.2: java.lang.IllegalArgumentException: Document base C:\Users\hanrong\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Struts2_test2 does not exist or is not a readable directory
严重: Exception starting Context with name [/Struts2_test2]
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Struts2_test2]]
问题原因:
在学习使用 Eclipse 开发 Java Web 应用程序时,常常会拷贝旧项目然后改个名字作为新的项目。这样直接运行新的项目则会发生以上的错误。因为旧项目和新项目的 Context root 是一样的,当它们同时被 Tomcat 服务器加载时,由于两个项目处于同一个虚拟主机(Host)当中,就会发生冲突了。
解决方法:
修改其中一个项目工程的 Context root(如下图所示)。
![](http://static.oschina.net/uploads/img/201503/14174456_cvCp.png)
相关文章推荐
- tomcat启动报错:java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
- 配置Struts2 遇到的两个异常 java.lang.ClassNotFoundException / org.apache.catalina.LifecycleException
- Caused by: java.lang.ClassNotFoundException: org.apache.catalina.LifecycleException
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException
- 【shiro】报错:Caused by: java.lang.ClassNotFoundException: org.apache.shiro.spring.LifecycleBeanPostProcessor
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com
- Maven使用tomcat7-maven-plugin插件run时出现错误: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com
- Caused by: java.lang.ClassNotFoundException: org.apache.shiro.spring.LifecycleBeanPostProcessor
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com
- 错误解决:java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to star
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com
- java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com