When running my WebApp project from Eclipse most of times it run correctly. But if by mistake to stop server, I kill it in \"Console\" view on instead of \"Stop\" Server from \"
I encountered the same issue and cleaning and recreating server does not help. But when I deployed another project, it was able to start successfully. After much comparison, I found differences in the .project files. So I copy the contents of the .project file of the working project into the one that has problem, add it back to the server and it works. Following is the contents of the .project file that works. Note that you need to change the name of the project accordingly:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Project Name</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
Steps which I followed and will work 100%:
Just do maven -> Update project configuration and clean/build from your eclipse. Project will be loaded.
I suffered from this problem, but cause was different.
Problem sprang from wrong server name([Project Name] != [Server Name])
.
I thought that i could figure out by recreate Server.
This Problem can solve by following below steps:
[Severs]
and remove server.[Project Explorer]
and delete Server(you created).[Project -> Clean]
[Severs]
and new server.server.xml
foor your web server.[Severs]
and remove server.I was quite puzzled by the problem because I had another jar dependency working before the issue occurred. I am using Eclipse Luna which already had m2e integration and none of the above solutions worked for me.
The problem started when adding a new jar dependency to a maven war project, but it still worked well when that one was commented out in the pom. Luckily I was able to compare both projects and eventually the issue was related to a missing project facet in the new jar project: Utility Module.
I have stopped using this method of running my webapp.
I use mvn tomcat:run
instead. Much easier. Though I don't know how to debug.