• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Web project doesn't run on Eclipse's Tomcat

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a J2EE web project, using Struts and Hibernate. It worked out perfectly on my development enviroment until few days ago (I really don't know what happened, I didn't touch anything..), when it stopped running on Eclipse's tomcat server. I'm using Eclipse Java EE kepler, JRE 6 and Tomcat 5.5.36. The project runs fine on an external Tomcat 5.5.36 but when I run it on Eclipse I get:

404 - The requested resource is not available.

The Console trace is:



The error is:

startup failed due to previous errors

But I can't trace it further because Tomcat's localhost log is empty, it exists but empty.

This is my web.xml:



Please, any little help would be great because I'm stuck since several days. Thank you!!
 
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

You tried delete the cache of tomcat ?

Apache Tomcat will automatically create cache files for every page it serves. Sometimes it is necessary to delete this cache. Once deleted, Tomcat will automatically rebuild the cache files.

Deleting the tomcat cache does not erase any data, these are only temporary files.

To delete the Tomcat cache:

Windows:

1) Stop the Tomcat service.

2) Delete the folder named "Catalina" in your work folder. The default location for this folder is:

For example: C:\program files\grouplink\everything\tomcat\work

3) Start the Tomcat service. The work folder will automatically be recreated.
 
unai trecet
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Edson Cezar,
I've deleted Catalina folder in work folder and then I've started Tomcat (I've cleaned the server on Eclipse too), but it doesn't work..
The server on Eclipse is the same that works fine when I use it externally (without Eclipse): It runs using the same Tomcat. Eclipse must do something or look at something that Tomcat alone doesn't, I don't know...
Thak you!
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


GRAVE: Error filterStart
26-nov-2013 13:43:16 org.apache.catalina.core.StandardContext start
GRAVE: Falló en arranque del Contexto [/phnemos_ph] debido a errores previos


Apparently something is going wrong with a filter, so the web app doesn't even start up. Try commenting out the filter in web.xml and see if that makes a difference. If it does, you'll have to look into what that filter does, and why it can't be initialized.
 
unai trecet
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Ulf,

It seems that the project has every filter definition commented in web.xml. Maybe I should discomment some of them:

[UD: removed a large chunk of code that has nothing to do with the problem ]

Thank you!
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unai, I have removed all that stuff about the Tomcat configuration from your post - that has nothing to do with the problem.

What I was talking about is the filter in your web app. As far as I can tell there is only a single one, named "Filtro de Seguridad". Make sure all its classes, jar files, configuration info and whatever else it may need are in the correct places.
 
unai trecet
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOLVED!! This is the solution, founded here http://stackoverflow.com/questions/8709528/httpservlet-cannot-be-resolved-to-a-type-is-this-a-bug-in-eclipse

You have to set the runtime for your web project to the Tomcat installation you are using; you can do it in the "Targeted runtimes" section of the project configuration.

In this way you will allow Eclipse to add Tomcat's Java EE Web Profile jars to the build path.

Remember that the HttpServlet class isn't in a JRE, but at least in an Enterprise Web Profile (e.g. a servlet container runtime /lib folder).

Thank you!

 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stuff like this is why I prefer the sysdeo Tomcat plugin over the Eclipse-bundled WTP. The sysdeo Tomcat runs exactly as a standalone Tomcat, other than the fact that it allows Tomcat to be controlled from within Eclipse and that catalina.out gets redirected to the Eclipse console.

The WTP plugin is a horrid mess that makes imperfect copies of the Tomcat configuration and easily gets out of sync with your needs.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic