Maven Project - Click on Tomcat, but do not run

Asked

Viewed 911 times

1

I have a project from Maven which, although the messages displayed on the Eclipse terminal inform that the Deploy was successfully done. When I type the URL into the browser, I get a 404 error; then when opening the manager of Tomcat, I try to start it, but I also get an error.

Eclipse terminal output, operation of deploy:

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ example ---
[INFO] Packaging webapp
[INFO] Assembling webapp [example] in [C:\Users\Kleber\git\maven_example\target\example-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\Kleber\git\maven_example\src\main\webapp]
[INFO] Webapp assembled in [827 msecs]
[INFO] Building war: C:\Users\Kleber\git\maven_example\target\example-0.0.1-SNAPSHOT.war
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) @ example <<<
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ example ---
[INFO] Deploying war to http://localhost:8080/webappExample  
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Uploading: http://localhost:8080/manager/text/deploy?path=%2FwebappExample
Uploaded: http://localhost:8080/manager/text/deploy?path=%2FwebappExample (13855 KB at 56318.8 KB/sec)

[INFO] tomcatManager status code:200, ReasonPhrase:OK
[INFO] OK - Deployed application at context path /webappExample
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.379s
[INFO] Finished at: Sun Apr 20 14:17:44 GMT-03:00 2014
[INFO] Final Memory: 13M/223M
[INFO] ------------------------------------------------------------------------

The source code of the project can be seen here:

https://github.com/klebermo/maven_example

Does anyone have any idea what’s wrong with the project?

1 answer

1


Well, after further testing, I discovered that the mistake was in one of my classes. One of the attributes of this class was with the wrong type, and so the system could not load this attribute on application startup (the attribute had the Autowired annotation).

I discovered this by running Tomcat from the terminal, and tracking its exit. That’s because I couldn’t find a way to get this output to be displayed on the Eclipse console.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.