天天看點

報錯Failed to start component/The main resource set specified is not valid

Error deploying configuration descriptor [C:\Users\12541\Desktop\JavaWeb\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\conf\Catalina\localhost\UserLand_springmvc.xml]
java.lang.IllegalStateException:
		ContainerBase.addChild: start: org.apache.catalina.LifecycleException: 
				Failed to start component[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/UserLand_springmvc]]
           

該項目部署在elipse工作台上的tomcat中,

在報錯中我們就可以看到該tomcat下conf中的server.xml路徑:

[C:\Users\12541\Desktop\JavaWeb\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\conf\Catalina\localhost\UserLand_springmvc.xml]

因為server.xml中:

<Context docBase="C:\Users\12541\Desktop\JavaWeb\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\webapps\ROOT" path="" reloadable="false"/></Host>
           

docBase所在路徑的項目不存在或者項目檔案内部缺少。我們直接修改doBase就可以。如果doBase項目不需要了,也可以直接删除Context。