score:29

Accepted answer

Seems like you have an outdated web application referenced in your Tomcat embeded server (You are using Tomcat As within Eclipse right?).

First checkout the deployed application within you server, and check the artifact name j2eeapplication-0.0.1-SNAPSHOT and version. You may need to remove it and clean your working directory the redeploy it and you should be safe.

score:0

In my case with Tomcat 9 and using Eclipse under Windows, I somehow removed the application from the webapp directory under the Tomcat true server and could no longer start the standalone Tomcat server service. Got the same root cause text as the initial posted question. My solution was to copy the Eclipse version of the application (from the workspace's .metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps tree) to the C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps directory. Note that I am not using Maven in my workspace, and it was just a standard Java Web project.

score:0

I had a similar issue with one of the projects. I tried all the solutions to this question. None worked for me. I then double-clicked the Tomcat server to see the actual config. In there, under the tab "Modules", there is a list of projects currently associated with the Tomcat server. I could see that the "trouble-causing project" was listed there. I clicked on that and hit remove.

Then everything started to work just fine.

Modules tab image

score:1

I had this error when I was starting an application that was designed for Tomcat 8 using Tomcat 7.

score:1

A maven update did the trick for me.

Right click on your maven project:

  • Maven > Update Project...
  • Select All
  • Check "Force Update of Snapshots/Releases"
  • Click Ok

Now, right click on your server:

  • Clean...

score:1

Just in case this might help anyone who come later, I managed to start my tomcat8 server after close and reopen the front project in:

The main resource set specified [project-to-be-reopened]

In my case, it's maven dependency that's causing me this issue, updating maven-dependency will also help.

score:1

I had a similar issue. Just if someone else runs into this problem:

For me it was caused because I had an old project deployed, then closed that project. For several weeks, everything was fine, until I used the "Clean..." command of eclipse on that tomcat server. From that point on the famous The main resource set specified [...path to deployment location of this project...] is not valid was raised every time I tried to start Tomcat. What solved this problem for me was just removing that old project from tomcat (Right click on that entry under Tomcat Server and choose "Remove").

score:2

For me, this was caused by a file permission issue. We use a different deployment strategy where I work (not something I can change) which means the webapp exists in a completely different directory to the normal Tomcat directory structure. The above exception occurred when the Tomcat runtime didn't have permission to access that directory.


Related Query

More Query from same tag