0

I am using the built in tomcat server in eclipse for my debugging and for some reason it stopped working.

I don't know how to start debugging this.

The apache is running (when I go to my servers address (on local host) port 8080 I get an error that is clearly from the apachie server (its a 404).

but it just behaves as if I did not compile anything ...

any ideas on what I should to to step by step debug this situation?

I guess this is because

C:\Users\myuser\Workspaces\projectName\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\projectName

is empty.

however C:\Users\myuser\Workspaces\projectName\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps

does seem to hold a complied version of my web app.

when I right click the server icon on the servers pane and go to properties - general, there is a "location" value and a change location button. clicking the button switches the location back and forth between [workspace metadata] and "/Servers/Tomcat v6.0 Server at localhost.server" - what doesthose two mean and which is the right one for me?

when I choose build all (after clearing "build automatically" nothing shows up on the console.

another thing I just noticed is that when starting the server I get the following warning: WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:projectName' did not find a matching property.

UPDATE: after removing the project from the server (right click on project in the servers pane), it started working again.

but one or two builds after it I got the following message:
Publishing failed with multiple errors Could not delete C:/Users/epeleg/Workspaces/projectName/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/projectName/WEB-INF/lib. May be locked by another process. Could not delete C:/Users/epeleg/Workspaces/projectName/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/projectName/WEB-INF. May be locked by another process.

and it went back into the same situation with 404's on any request. remove and re-add of the project did the trick again but I wander why could this be happening.

Cœur
  • 37,241
  • 25
  • 195
  • 267
epeleg
  • 10,347
  • 17
  • 101
  • 151
  • Did you try a Clean? Also once you switch locations try & restart Eclipse. From the 404 its evident that its still looking at your empty folder. – isobar Nov 28 '11 at 08:16
  • 1
    try to see if this helps: http://stackoverflow.com/questions/5934922/eclipse-tomcat-deploy-doesnt-work-any-more-classnotfoundexception – stivlo Nov 28 '11 at 08:20
  • I did try a Clean more then once, and also restarted eclipse more then once. do the two locations I mentioned match the two options switchabe with the "change location" button? – epeleg Nov 28 '11 at 08:21

2 Answers2

3
  • delete the server,
  • while adding new server - click on "configure runtime environments"
  • edit the server specification:
    • point to the location of the server on the disk.
    • JRE to point to the Installed JRE (not to the Workbench default JRE).
  • Finish, OK, Finish.
  • Untick in menu : Project -> Build Automatically (this should not be selected)
  • Right click on project and build it, then run on server.

This should do.

Pawan Kumar Jha
  • 118
  • 1
  • 11
  • 2
    I thought I would try this, but decided to first just remove the project from the server. when removed and added back, it just started working again. – epeleg Nov 28 '11 at 09:12
0

I tried a lot of things listed above, but without success.
Finally, it worked after:

- In my case it was old error regarding deploying project to server, which didn't want to disappear after rebuilding, just remove it from "problem view".

- remove content of target folder in you eclipse project

-lets process all "rebuild steps" as cleaning and refresh, rebuild eclipse project, remove your project from Tomcat in Server view and add it again, right click and publish it.

vahid abdi
  • 9,636
  • 4
  • 29
  • 35
vidano
  • 1