score:29
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.
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.
Source: stackoverflow.com
Related Query
- java.lang.IllegalArgumentException: The main resource set specified [...] is not valid
- java.lang.IllegalArgumentException: The main resource set specified [....\org.eclipse.wst.server.core\tmp0\wtpwebapps\...] is not valid
- Eclipse: The resource is not on the build path of a Java project
- The resource is not on the build path of a java project?
- Running Ant Build.xml getting: Java Virtual Machine Launcher: Could not find the main class. Program will exit
- The resource is not on the build path of a Java project
- Javah : The selected resource does not resolve to a Java element
- how to run eclipse by using a specified java path directory in eclipse not by the default Java path
- JAX-RS sub resource @PathParam value does not match any @Path annotation template parameters of the java method and its enclosing java type
- Selenium WebDriver Java code doesn't execute on eclipse: Could not find the main class
- "Could not find the main class" in Java Salesforce application
- Cannot Perform Operation: The resource is not on the build path of a Java project
- How do I set the main Java type in Eclipse?
- Java - Ant build (Eclipse) - Could not find the main class: nat.rutherford.DesktopStarter
- Error: Java Virtual Machine Launcher. Could not find the main class
- HTTP Status 404 - The requested resource is not available Java Servlet
- The resource is not on the build path of a java project (eclipse)
- Java Windowsbuilder is not showing anything in the design tab and no class name in the main tab
- Java installation not found in the specified folder Error - Glassfish Configuration
- Resource is not on the build path of a java project --TFS--Eclipse
- Java - Could not find the main class - reinstall didn't work
- Creating a java application with a mainClass using Maven in Eclipse - 'Could not find the main class'
- The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
- Java compiler level does not match the version of the installed Java project facet
- How to solve could not create the virtual machine error of Java Virtual Machine Launcher?
- Eclipse "this compilation unit is not on the build path of a java project"
- HTTP Status 404 - The requested resource (/) is not available
- This compilation unit is not on the build path of a Java project
- Difference between Java working set and Resource working set in Eclipse
- How can I set the current line of execution in the eclipse java debugger?
More Query from same tag
- Is it possible to add an eclipse plugin jar as a MAVEN dependency?
- eclipse, generating entities from tables, re-enable "do not ask again"
- Importing project android
- could not find class 'com.google.android.gms.ads.adview', referenced from method com.yyy.yyy.mainactivity.oncreate
- problem compiling a junit test class with ant
- How to get PyDev to understand tab characters (for Python 2.7)?
- Eclipse big cross icon meaning?
- ERROR: "Syntax error on token ";", , expected" Why?
- Using BLE in RSL10 Evaluation and development kit
- Images loading in exported JAR, but not when running from eclipse
- FATAL EXCEPTION: UpdateThread, null pointer Exception
- Cannot find the file to dynamically execute it
- Eclipse WTP: Glassfish does not include WEB-INF/lib in classpath
- Eclipse for PHP error Java wa started but returned error code 13
- Eclipse Maven Web Project Servlet Mappings
- Form Based authentication in REST Web serivces
- Java.lang.NoClassDefFoundError when using Maven
- Are there any advantages to regularly running Eclipse as Administrator?
- Does Eclipse installer make entries in Windows registry?
- How to import code style from java file to eclipse?
- Proper xpath for identifying the checkbox
- Eclipse Discovery Options in LUNA
- Help changing OSX Eclipse Java Heap allocation
- Accessing resources in an android test project
- Set active spring profile from pom.xml and integration with IDE
- Importing the Resin source into Eclipse
- How do I get Robolectric working with the Android-Release Archetype?
- Eclipse CSS AutoComplete/Content Assist not working
- Uable to link cucumber steps with corresponding already defined stepDefinations
- What organization is responsible for the maintenance of Eclipse for PHP (PDT)?