|
|
Re: Debug Code Out of Sync [message #186891 is a reply to message #186883] |
Fri, 05 January 2007 03:25 |
Eclipse User |
|
|
|
Originally posted by: wegener.cboenospam.com
Ben wrote:
> I'm even more confused now. I placed a code change in the code that I
> know should be excuted, a simple system.out.println. When I'm debugging
> I see the new code as I step through but it never execute it. I know
> that it must be executing an old version of the code but I don't know
> why it isn't updating the new code. Any help would be greatly appreciated.
>
> Thanks,
> Ben
>
You mentioned in your original post that you were running a web service
program. Are you deploying the code to the web server in the dependent
plugin after you update the code?
|
|
|
|
Re: Debug Code Out of Sync [message #186955 is a reply to message #186883] |
Fri, 05 January 2007 13:31 |
Eclipse User |
|
|
|
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com
In article <6e28c87934ed53eccf4ec9df06801323$1@www.eclipse.org>,
bsisson@simventions.com says...
> I'm even more confused now. I placed a code change in the code that I
> know should be excuted, a simple system.out.println. When I'm debugging I
> see the new code as I step through but it never execute it. I know that
> it must be executing an old version of the code but I don't know why it
> isn't updating the new code. Any help would be greatly appreciated.
>
> Thanks,
> Ben
I've run into the same thing, and posted about it a couple of weeks ago.
It appears to be due to the utility project (the one that the web
service is calling) not being updated with the new code, after you make
changes. If you haven't done a "clean" on the project (Project | clean)
and then a restart of the server, do that first; it usually takes care
of it, though not always. Sometimes I've had to delete the .jar of the
utility project, create a .jar manually (export), and copy it into place
in the appropriate location for debugging (usually tmp0/....)
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
|
|
|
|
|
Re: Debug Code Out of Sync [message #186999 is a reply to message #186978] |
Fri, 05 January 2007 15:03 |
Eclipse User |
|
|
|
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com
In article <ba714fca1401a105733789b4a3f79bb3$1@www.eclipse.org>,
bsisson@simventions.com says...
> -Sometimes I've had to delete the .jar of the
> -utility project, create a .jar manually (export), and copy it into place
> -in the appropriate location for debugging (usually tmp0/....)
>
> Not sure that I am following this part of the response. I have tried on a
> number of occasions to do a Project->Clean and then run the service only
> to have it fail to fix the sync issue. So, my next step would be to try
> the second part of your solution. I want to make sure that I clearly
> understand what you are stating.
>
> When you talk about deleting the .jar of the utitlity project do you mean
> the project that I have created and am calling which is out of sync? If
In my case, it was the .jar of the project that is *being called* by the
web service.
> so, then I'm not sure which jar you want me to delete. I'm trying to run
> the web service from the workspace. In that case I would expect it to
> pick up the source code and I have created a jar file yet to be deployed.
When you run an app through the Eclipse workspace, Eclipse builds a .jar
file behind the scenes, and deploys it to its temporary location where
the built-in servers can find it. In the case of a tomcat server, on my
system it's in:
C:\PROJECTS\workspace3.2.1\.metadata\.plugins
\org.eclipse.wst.server.core\tmp0\webapps\eddSrv\WEB-INF\lib
Where "eddSrv" is the name of my webapp, and the jar file has the same
name as its project in the workspace.
> Then you indicated that I should create a .jar file manually, again I'm
> assuming you mean for the referenced project. Typically when I'm readly
Yes, for the referenced project, the one that your webapp is calling.
> to deploy I would do this and place it in the server but I'm not sure
> where you are indicating to place it.
In the above-listed folder. You will likely see an old one in there,
corresponding to the version of the code that is actaully running (not
the updates you have made since then).
> I appreciate you help and hope that you can help clearify my questions.
Hopefully I did; if not, post back.
If you subscribe to the eclipse.webtools newsgroup, and check threads
titled "Eclipse won't run updated version of a class" and "It's
baaaaack!: Eclipse won't run updated version of a class", you will see
my anguished posts about this issue, and how I eventually worked my way
around it. If I do a project clean every time before starting a debug
session, it seems to work most of the time; sometimes I need to go
through two iterations of clean/start/clean/start before it picks up my
new code. There is without a doubt a bug here, but I can't reliably
reproduce the conditions that start it happening.
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
|
|
|
Re: Debug Code Out of Sync [message #187007 is a reply to message #186993] |
Fri, 05 January 2007 15:05 |
Eclipse User |
|
|
|
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com
In article <9a81e18e7b5291daed9f65e09de5dd3d$1@www.eclipse.org>,
bsisson@simventions.com says...
> Is this the location for the temp jar files that you were talking about?
> C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\ tmp0\webapps\WebServiceName\WEB-INF\lib
Yes, that's the one.
>
> I found a conflicting jar file in this location. Most notably an old jar
> file that did not update for the changes I made for the utility project
> but a jar file that did update for the web service that I was changing. I
> am in the process of testing this now to see if this was the couase.
You found it a lot quicker than I did the first time!
--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
|
|
|
Powered by
FUDForum. Page generated in 0.11000 seconds