Problem starting a Spring MVC webapp in Eclipse with Tomcat, IllegalArgumentException
When I start the application from Eclipse, I get the following error:
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Users\myUser\Workspaces\ProjectName\.metadata\.plugins\org.e开发者_高级运维clipse.wst.server.core\tmp0\wtpwebapps\projectName does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4814)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4994)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Jul 4, 2011 5:12:55 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error in resourceStart()
I've added a Tomcat 7.0.12 in Servers, and I added the app. in 'Configured' in the 'Add or Remove...' window. I've also tried with Tomcat 6.0.x.
I think I have a problem in some of the *xml files, but don't know which one to check or paste here first.
And to note that I can make a war file with Maven and when I deploy it and start it on a Tomcat server the app works. But from Eclipse I cannot start it.
You need to delete the tmp0 folder, bounce Eclipse and retry. This usually happens when Eclipse does not exit gracefully while the embedded server is running. You should stop the server before exiting Eclipse, that should help.
精彩评论