Friday, August 15, 2014

Embedded Tomcat in Eclipse could not start after mvn clean - solved

Web server could not start in Eclipse (or Spring Tool Suite, STS) after doing mvn clean on your project.

Solution is in 2 steps:
1. Change Server path / Deploy path as described here: http://stackoverflow.com/questions/16340711/tomcat-http-status-404
Key moments on this step:
1.1. server has to be stopped
1.2. to ensure full stop, just restart Eclipse
1.3. you have to mark Tomcat Installation

2. Ensure Eclipse uses JDK, not JRE. I dont know why by default Eclipse ignore JAVA_HOME and uses JRE. Solution is described here: http://stackoverflow.com/questions/13259866/why-does-maven-want-to-use-jre7-instead-of-jdk-against-all-adjustments
In short:
2.1. Window -> Preferences
2.2. Java -> Installed JREs
2.3. add base path of JDK (with includes files src.xip and foldersbin, db...)
2.4. deactivate old and activate new one


No comments:

Post a Comment