0

I setup a maven project based on a working project. Mine is created with the template Dynamic Web Project from Eclipse. I build and deploy this maven project with no errors. here is the output from Eclipse console:

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\Downloads\Projetos\example\target\example-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\Kleber\Downloads\Projetos\example\src\main\webapp]
[INFO] Webapp assembled in [873 msecs]
[INFO] Building war: C:\Users\Kleber\Downloads\Projetos\example\target\example-0.0.1-SNAPSHOT.war
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:redeploy (default-cli) @ example <<<
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.2:redeploy (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&update=true
Uploaded: http://localhost:8080/manager/text/deploy?path=%2FwebappExample&update=true (13855 KB at 17083.1 KB/sec)

[INFO] tomcatManager status code:200, ReasonPhrase:OK
[INFO] OK - Undeployed application at context path /webappExample
[INFO] OK - Deployed application at context path /webappExample
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.405s
[INFO] Finished at: Sun Apr 20 13:50:59 GMT-03:00 2014
[INFO] Final Memory: 15M/218M
[INFO] ------------------------------------------------------------------------

But when type the url for this project in my browser, I get a 404 error. Then I enter the tomcat manager and start the project, and the error 'FAIL - Application at context path /webappExample could not be started'.

The complete code of the project can be found here:

https://github.com/klebermo/maven_example

Can anyone say what I am doing wrong?

user3399000
  • 353
  • 3
  • 18
Kleber Mota
  • 8,521
  • 31
  • 94
  • 188
  • Post the complete stack trace. – Stefan Apr 20 '14 at 18:24
  • I can't find any stack trace to post here. In eclipse console is displayed the message I post above, and in the tomcat manager the only message displayed is "FAIL - Deployed application at context path /webappExample but context failed to start" in the web interface (when I try deploy he war file directly in this interface). – Kleber Mota Apr 20 '14 at 18:31

1 Answers1

0

So, in fact my problem was a code problem with one of my classes. I discover this running the tomcat from the console (I am in Windows 8 machine) and analysing the output.

I expected this output should be displayed on the eclipse console, but instead I see only the output from Maven. Anyone knows how to make for this two outputs be shown by eclipse, and avoid the OS console?

Kleber Mota
  • 8,521
  • 31
  • 94
  • 188
  • You can switch the console output with the "Display selected console" button: http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fviews%2Fconsole%2Fref-console_view.htm -- but nexttime start an new question if you want to ask something. – Ralph Apr 21 '14 at 08:04