aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Debuging Eclipse Java Project as External Web Application - debug view not in sync with code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Debuging Eclipse Java Project as External Web Application - debug view not in sync with code" Watch "Debuging Eclipse Java Project as External Web Application - debug view not in sync with code" New topic
Author

Debuging Eclipse Java Project as External Web Application - debug view not in sync with code

Dominic Owen
Greenhorn

Joined: Jan 27, 2010
Posts: 1
EDIT: Nevermind - I figured out the problem! It was a project specific problem involving needing to rerun an ant file before deploying Tomcat.


Hi all,

I know the setup sounds crazy, but given the project's structure, this was the only way I could get it to deploy within Eclipse.

The project itself is a large open source application (http://geonetwork-opensource.org/) that was not specifically designed to run in Eclipse. However, after a bit of a struggle I have managed to get the project up and running in eclipse debug mode.

The setup is as follows: The project has three java source folders, and a large number of other directories at the same level. One of these folders is "web", in which three connected web applications sit. So the contexts are web\geonetwork, web\intermap and web\geoserver. For a very detailed description of my setup you can look at this setup document I created for other purposes: http://lab.usgin.org/applications/doc/windows-setup-guide-downloading-developing-deploying-and-debugging-geonetwork-withi

Because of this interdependent setup, I do not know how to create each context as a "Dynamic Web Project" in eclipse - so instead I link to each context as an "external web module" within my Eclipse Tomcat Server. This works fine - my applications run great from Tomcat and I can debug through the code seemingly well too.

The problem occurs when I make changes to the code - when I debug after changing the code, the debugger shows my new code, but is out of sync and is clearly running off of the old class files (stopping at where break points used to be, taking on old values, etc.). I've tried various combination of project refreshes, project cleaning and restarting eclipse, but none seem to work.

I suspect this syncing problem occurs because when I initially debugged, I received the message: Source not Found - with an "Edit lookup Path" option. When I did so, I added my java project, and then the source was found. However, my unconventional web app setup combined with the syncing problems makes me think I should have done this individual step differently. I know there is a lot going on behind the scenes with my code between eclipse and tomcat, and I think that may be where the problem lies...but so far, I am stumped!

I know this is quite the unique problem - but any feedback would be greatly welcomed!

Thanks,
Dominic

EDIT (a somewhat shorter synopsis): I have a Java project in eclipse that contains three web application contexts. To get them to run in Tomcat in Eclipse, I linked to them as external Web Modules. When I run them in Tomcat and debug, the Tomcat debugger shows the newest version of my Java source code, but runs old class files (i.e. my web application does not receive code changes). I can not get them to sync, even with server restarts, project cleans and eclipse restarts.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Debuging Eclipse Java Project as External Web Application - debug view not in sync with code