Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Eclipse won't run updated version of a class
Eclipse won't run updated version of a class [message #185029] Fri, 15 December 2006 15:47 Go to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

I feel silly asking this, because I know it's got to be something stupid
I'm missing, but I've already spent more time on this than I can really
aford, and I guess I need somebody to whack me upside the head and tell
me "you need to change this, stupid!".

Running Eclipse 3.2.1, and I ran the updater this morning, so I should
have the latest stable releases of Eclipse and the WTP.

This is a webapp project with another project which deploys as a utility
..jar, but I run them both in the debugger so I can work on them
concurrently. I have one utility class that I made changes to yesterday
(and repeatedly since then) that the changes won't execute in the
debugger; it keeps executing the previous version of the code, as
confirmed by watching the debug variables pane and the execution
location bar in the source pane. I've tried cleaning every project in
the workspace several times, cleaning eclipse several times, rebooting
the computer, checking to be sure the source file is writable, deleting
every .jar it's created that I can find, installing all available
updates to eclipse, deleting and re-creating the project and everything
else I can think of short of waving a dead chicken over the keyboard.

What could I be missing???

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Re: Eclipse won't run updated version of a class [message #185050 is a reply to message #185029] Fri, 15 December 2006 16:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

In article <MPG.1fec8d7f5bc9d6739896b6@news.eclipse.org>,
ns_dkerber@ns_WarrenRogersAssociates.com says...
> I feel silly asking this, because I know it's got to be something stupid
> I'm missing, but I've already spent more time on this than I can really
> aford, and I guess I need somebody to whack me upside the head and tell
> me "you need to change this, stupid!".
>
> Running Eclipse 3.2.1, and I ran the updater this morning, so I should
> have the latest stable releases of Eclipse and the WTP.
>
> This is a webapp project with another project which deploys as a utility
> .jar, but I run them both in the debugger so I can work on them
> concurrently. I have one utility class that I made changes to yesterday
> (and repeatedly since then) that the changes won't execute in the
> debugger; it keeps executing the previous version of the code, as
> confirmed by watching the debug variables pane and the execution
> location bar in the source pane. I've tried cleaning every project in
> the workspace several times, cleaning eclipse several times, rebooting
> the computer, checking to be sure the source file is writable, deleting
> every .jar it's created that I can find, installing all available
> updates to eclipse, deleting and re-creating the project and everything
> else I can think of short of waving a dead chicken over the keyboard.
>
> What could I be missing???

Also, for troubleshooting purposes, is there a way of telling what disk
file Eclipse or Tomcat is using for a class, whether it is a standalone
..class file, or a .jar file? Of course, it would need to be done
without modifying source code, because the problem involves (not)
reading updated source code.

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Re: Eclipse won't run updated version of a class [message #185066 is a reply to message #185029] Fri, 15 December 2006 16:51 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Assuming the "Run modules directly from the workspace..." is checked in
the server editor, then the jar in the
"<workspace> \.metadata\.plugins\org.eclipse.wst.server.core\tmp?\webapps \ <yourwebapp>\WEB-INF\lib"
directory with the utility project's name is the one that must have the
updated class for it be available during debug. When Tomcat runs, that
jar contains the class that will be used. Examine that jar to see if it
is up to date. If not, try removing and re-adding the project.

You might try deleting the
".metadata\.plugins\org.eclipse.wst.server.core\tmp?\work" directory to
clean out any stale data in Tomcat's work directory. I can't tell if
this would impact your issue, but it wouldn't hurt to eliminate that as
a possibility.

Cheers,
Larry


David Kerber wrote:
> I feel silly asking this, because I know it's got to be something stupid
> I'm missing, but I've already spent more time on this than I can really
> aford, and I guess I need somebody to whack me upside the head and tell
> me "you need to change this, stupid!".
>
> Running Eclipse 3.2.1, and I ran the updater this morning, so I should
> have the latest stable releases of Eclipse and the WTP.
>
> This is a webapp project with another project which deploys as a utility
> .jar, but I run them both in the debugger so I can work on them
> concurrently. I have one utility class that I made changes to yesterday
> (and repeatedly since then) that the changes won't execute in the
> debugger; it keeps executing the previous version of the code, as
> confirmed by watching the debug variables pane and the execution
> location bar in the source pane. I've tried cleaning every project in
> the workspace several times, cleaning eclipse several times, rebooting
> the computer, checking to be sure the source file is writable, deleting
> every .jar it's created that I can find, installing all available
> updates to eclipse, deleting and re-creating the project and everything
> else I can think of short of waving a dead chicken over the keyboard.
>
> What could I be missing???
>
Re: Eclipse won't run updated version of a class [message #185090 is a reply to message #185066] Fri, 15 December 2006 19:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

In article <elujpu$85o$1@utils.eclipse.org>, Larry.Isaacs@sas.com
says...
> Assuming the "Run modules directly from the workspace..." is checked in
> the server editor, then the jar in the
> "<workspace> \.metadata\.plugins\org.eclipse.wst.server.core\tmp?\webapps \ <yourwebapp>\WEB-INF\lib"
> directory with the utility project's name is the one that must have the
> updated class for it be available during debug. When Tomcat runs, that
> jar contains the class that will be used. Examine that jar to see if it
> is up to date. If not, try removing and re-adding the project.
>
> You might try deleting the
> ".metadata\.plugins\org.eclipse.wst.server.core\tmp?\work" directory to
> clean out any stale data in Tomcat's work directory. I can't tell if
> this would impact your issue, but it wouldn't hurt to eliminate that as
> a possibility.

Still no joy with either of those suggestions. What I find utterly
unexplainable (and I should have mentioned it before) is that if I
change something in the code while debugging (usually changing a
variable name) and let hot code replace do its thing, it works fine with
the new code. But if I stop the debug session and restart it, I'm back
to the old version of the code when it executes, even though my source
pane shows the new stuff. I'm about ready to throw this computer
through the wall and start from a blank HD!! I already tried a clean
install of Eclipse and recreating the projects from scratch, importing
only the source into a new workspace.

.....

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Re: Eclipse won't run updated version of a class [message #185097 is a reply to message #185090] Fri, 15 December 2006 20:29 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
If the change is being applied to the utility jar that was published,
you should see Tomcat reload the webapp. Do you see that happening?

Since this behavior is repeatable for you, you could report a WTP bug on
the jsp.server component and provide detailed steps to reproduce the
problem. That way I, and perhaps others, can see if we can duplicate
the your behavior and determine what the cause is.

Cheers,
Larry

David Kerber wrote:
> In article <elujpu$85o$1@utils.eclipse.org>, Larry.Isaacs@sas.com
> says...
>> Assuming the "Run modules directly from the workspace..." is checked in
>> the server editor, then the jar in the
>> "<workspace> \.metadata\.plugins\org.eclipse.wst.server.core\tmp?\webapps \ <yourwebapp>\WEB-INF\lib"
>> directory with the utility project's name is the one that must have the
>> updated class for it be available during debug. When Tomcat runs, that
>> jar contains the class that will be used. Examine that jar to see if it
>> is up to date. If not, try removing and re-adding the project.
>>
>> You might try deleting the
>> ".metadata\.plugins\org.eclipse.wst.server.core\tmp?\work" directory to
>> clean out any stale data in Tomcat's work directory. I can't tell if
>> this would impact your issue, but it wouldn't hurt to eliminate that as
>> a possibility.
>
> Still no joy with either of those suggestions. What I find utterly
> unexplainable (and I should have mentioned it before) is that if I
> change something in the code while debugging (usually changing a
> variable name) and let hot code replace do its thing, it works fine with
> the new code. But if I stop the debug session and restart it, I'm back
> to the old version of the code when it executes, even though my source
> pane shows the new stuff. I'm about ready to throw this computer
> through the wall and start from a blank HD!! I already tried a clean
> install of Eclipse and recreating the projects from scratch, importing
> only the source into a new workspace.
>
> ....
>
Re: Eclipse won't run updated version of a class [message #185105 is a reply to message #185097] Fri, 15 December 2006 20:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

In article <elv0jv$s9q$1@utils.eclipse.org>, Larry.Isaacs@sas.com
says...
> If the change is being applied to the utility jar that was published,
> you should see Tomcat reload the webapp. Do you see that happening?

I see a restart notice in the console pane of eclipse; is that where
you're referring to?

>
> Since this behavior is repeatable for you, you could report a WTP bug on
> the jsp.server component and provide detailed steps to reproduce the
> problem. That way I, and perhaps others, can see if we can duplicate
> the your behavior and determine what the cause is.

Considering that it had been working for months up until yesterday, it
might be kind of tough to reproduce. I'll see if I can put something
together, though. Are any of your contributers in or near Rhode Island,
and would be willing to come see it on my machine <GGG>?


>
> Cheers,
> Larry
>
> David Kerber wrote:
> > In article <elujpu$85o$1@utils.eclipse.org>, Larry.Isaacs@sas.com
> > says...
> >> Assuming the "Run modules directly from the workspace..." is checked in
> >> the server editor, then the jar in the
> >> "<workspace> \.metadata\.plugins\org.eclipse.wst.server.core\tmp?\webapps \ <yourwebapp>\WEB-INF\lib"
> >> directory with the utility project's name is the one that must have the
> >> updated class for it be available during debug. When Tomcat runs, that
> >> jar contains the class that will be used. Examine that jar to see if it
> >> is up to date. If not, try removing and re-adding the project.
> >>
> >> You might try deleting the
> >> ".metadata\.plugins\org.eclipse.wst.server.core\tmp?\work" directory to
> >> clean out any stale data in Tomcat's work directory. I can't tell if
> >> this would impact your issue, but it wouldn't hurt to eliminate that as
> >> a possibility.
> >
> > Still no joy with either of those suggestions. What I find utterly
> > unexplainable (and I should have mentioned it before) is that if I
> > change something in the code while debugging (usually changing a
> > variable name) and let hot code replace do its thing, it works fine with
> > the new code. But if I stop the debug session and restart it, I'm back
> > to the old version of the code when it executes, even though my source
> > pane shows the new stuff. I'm about ready to throw this computer
> > through the wall and start from a blank HD!! I already tried a clean
> > install of Eclipse and recreating the projects from scratch, importing
> > only the source into a new workspace.
> >
> > ....
> >
>

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Re: Eclipse won't run updated version of a class - fixed!! [message #185127 is a reply to message #185105] Fri, 15 December 2006 22:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

I finally got this to break loose and start accepting code changes by
rearranging the methods inside the class, so that they were no longer in
the same order as previously. And it didn't just work for the change of
moving them around; I was able to edit the code within the troublesome
method as well, and have it work again. Apparently, whereever it was
caching the old code finally got dumped when the methods were
rearranged.

Good luck repro'ing that! I just don't have time to work on making a
repro right now, though I'd love to be able to.

Thanks for your patience and suggestions, even though they didn't
actually fix the problem; I understand where things are much better now.


In article <MPG.1fecd102fe6d4f889896b9@news.eclipse.org>,
ns_dkerber@ns_WarrenRogersAssociates.com says...
> In article <elv0jv$s9q$1@utils.eclipse.org>, Larry.Isaacs@sas.com
> says...
> > If the change is being applied to the utility jar that was published,
> > you should see Tomcat reload the webapp. Do you see that happening?
>
> I see a restart notice in the console pane of eclipse; is that where
> you're referring to?
>
> >
> > Since this behavior is repeatable for you, you could report a WTP bug on
> > the jsp.server component and provide detailed steps to reproduce the
> > problem. That way I, and perhaps others, can see if we can duplicate
> > the your behavior and determine what the cause is.
>
> Considering that it had been working for months up until yesterday, it
> might be kind of tough to reproduce. I'll see if I can put something
> together, though. Are any of your contributers in or near Rhode Island,
> and would be willing to come see it on my machine <GGG>?
>
>
> >
> > Cheers,
> > Larry
> >
> > David Kerber wrote:
> > > In article <elujpu$85o$1@utils.eclipse.org>, Larry.Isaacs@sas.com
> > > says...
> > >> Assuming the "Run modules directly from the workspace..." is checked in
> > >> the server editor, then the jar in the
> > >> "<workspace> \.metadata\.plugins\org.eclipse.wst.server.core\tmp?\webapps \ <yourwebapp>\WEB-INF\lib"
> > >> directory with the utility project's name is the one that must have the
> > >> updated class for it be available during debug. When Tomcat runs, that
> > >> jar contains the class that will be used. Examine that jar to see if it
> > >> is up to date. If not, try removing and re-adding the project.
> > >>
> > >> You might try deleting the
> > >> ".metadata\.plugins\org.eclipse.wst.server.core\tmp?\work" directory to
> > >> clean out any stale data in Tomcat's work directory. I can't tell if
> > >> this would impact your issue, but it wouldn't hurt to eliminate that as
> > >> a possibility.
> > >
> > > Still no joy with either of those suggestions. What I find utterly
> > > unexplainable (and I should have mentioned it before) is that if I
> > > change something in the code while debugging (usually changing a
> > > variable name) and let hot code replace do its thing, it works fine with
> > > the new code. But if I stop the debug session and restart it, I'm back
> > > to the old version of the code when it executes, even though my source
> > > pane shows the new stuff. I'm about ready to throw this computer
> > > through the wall and start from a blank HD!! I already tried a clean
> > > install of Eclipse and recreating the projects from scratch, importing
> > > only the source into a new workspace.
> > >
> > > ....
> > >
> >
>
>

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Re: Eclipse won't run updated version of a class [message #185135 is a reply to message #185105] Fri, 15 December 2006 22:12 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
David Kerber wrote:
> In article <elv0jv$s9q$1@utils.eclipse.org>, Larry.Isaacs@sas.com
> says...
>> If the change is being applied to the utility jar that was published,
>> you should see Tomcat reload the webapp. Do you see that happening?
>
> I see a restart notice in the console pane of eclipse; is that where
> you're referring to?

Yes.

Making changes during a running server is a complicated situation due to
a lot of variables, state of the server, state of the webapp, the nature
of the change being made. Resuming can present a problem because after
the webapp reload, the classloader that Eclipse was manipulating is
discarded by Tomcat and replaced with a new one. You will likely have
better luck if you make your changes, but don't save while paused. When
your changes are done, resume first, then save and allow the reload to
occur. Finally refresh your browser to hit the breakpoint again and see
where you stand.

>
>> Since this behavior is repeatable for you, you could report a WTP bug on
>> the jsp.server component and provide detailed steps to reproduce the
>> problem. That way I, and perhaps others, can see if we can duplicate
>> the your behavior and determine what the cause is.
>
> Considering that it had been working for months up until yesterday, it
> might be kind of tough to reproduce. I'll see if I can put something
> together, though. Are any of your contributers in or near Rhode Island,
> and would be willing to come see it on my machine <GGG>?

What will happen when attempting "hot debug modifications" can be very
difficult to predict in a server environment, as opposed to just running
a Java application. I can't say why it worked for a while. It may be
that Murphy wanted you to build up a head of steam before choosing to
stick his foot out at this time. :)

Cheers,
Larry
>
>
>> Cheers,
>> Larry
>>
Re: Eclipse won't run updated version of a class [message #185144 is a reply to message #185135] Fri, 15 December 2006 22:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

In article <elv6kn$bpn$1@utils.eclipse.org>, Larry.Isaacs@sas.com
says...
> David Kerber wrote:
> > In article <elv0jv$s9q$1@utils.eclipse.org>, Larry.Isaacs@sas.com
> > says...
> >> If the change is being applied to the utility jar that was published,
> >> you should see Tomcat reload the webapp. Do you see that happening?
> >
> > I see a restart notice in the console pane of eclipse; is that where
> > you're referring to?
>
> Yes.
>
> Making changes during a running server is a complicated situation due to
> a lot of variables, state of the server, state of the webapp, the nature
> of the change being made. Resuming can present a problem because after
> the webapp reload, the classloader that Eclipse was manipulating is
> discarded by Tomcat and replaced with a new one. You will likely have
> better luck if you make your changes, but don't save while paused. When
> your changes are done, resume first, then save and allow the reload to
> occur. Finally refresh your browser to hit the breakpoint again and see
> where you stand.

I do that sometimes, depending on the change and where I am in the
program flow.


> >> Since this behavior is repeatable for you, you could report a WTP bug on
> >> the jsp.server component and provide detailed steps to reproduce the
> >> problem. That way I, and perhaps others, can see if we can duplicate
> >> the your behavior and determine what the cause is.
> >
> > Considering that it had been working for months up until yesterday, it
> > might be kind of tough to reproduce. I'll see if I can put something
> > together, though. Are any of your contributers in or near Rhode Island,
> > and would be willing to come see it on my machine <GGG>?
>
> What will happen when attempting "hot debug modifications" can be very
> difficult to predict in a server environment, as opposed to just running
> a Java application. I can't say why it worked for a while. It may be
> that Murphy wanted you to build up a head of steam before choosing to
> stick his foot out at this time. :)

He timed it well, but I pulled through! I posted a success message a
few minutes ago...

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
It's baaaaack!: Eclipse won't run updated version of a class [message #185152 is a reply to message #185127] Sat, 16 December 2006 22:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

In article <MPG.1fece6f2cd57574a9896ba@news.eclipse.org>,
ns_dkerber@ns_WarrenRogersAssociates.com says...
> I finally got this to break loose and start accepting code changes by
> rearranging the methods inside the class, so that they were no longer in
> the same order as previously. And it didn't just work for the change of
> moving them around; I was able to edit the code within the troublesome
> method as well, and have it work again. Apparently, whereever it was
> caching the old code finally got dumped when the methods were
> rearranged.

....

Doing more work today, and the problem suddenly came back after doing a
bunch of code editing and a little refactoring. Everything was fine for
a couple of hours, including several starts and stops of debugging, but
at one point it suddenly stopped executing my code changes, instead
insisting on running older versions. It might be a coincidence, but
this started after taking a break for a couple of hours and then coming
back to do some more editing.

Here's the sequence of what I've done to try to get this working again:

Since the class files looked to be old, I deleted the utility package's
..class files under C:\PROJECTS\workspace3.2.1\.metadata\.plugins
\org.eclipse.wst.server.core\tmp0\webapps\eddSrv\WEB-INF\lib , and then
tried restarting debugging. It gave me "NoClassDefFound" errors.

I stopped eclipse and restarted it with the -clean option, and
immediately cleaned all projects in the workspace. Still got
NoClassDefFound error. Stopped eclipse. Deleted webapp folder under C:
\PROJECTS\workspace3.2.1\.metadata\.plugins\org.eclipse.wst. server.core
\tmp0\work, from the app named level (leaving Catalina/localhost).
Restart eclipse -clean, and clean all projects. Restart debugger.
Different error: (The same class with NoClassDefFound) cannot be
resolved to a type in the opening .jsp. Copied class tree of utility
project back to its previous spot under webapps/appname/web-inf/lib.
Still no joy.

Created new server to run webapp. That fixed it. I don't remember for
sure, but I don't think I tried that when I was messing with this
yesterday and Thursday.

Went back and compared folders of original server to new one and
realized that I missed copying the .jar of the utility project to the
web-inf/lib folder. After doing that, this server was back to normal as
well.

So it looks like something at times can keep eclipse from refreshing
either the .jar file in its server folders, or the class folders under
it, preventing updated code from being run.

HTH with figuring out what's going wrong!

D
Re: Eclipse won't run updated version of a class [message #185162 is a reply to message #185029] Sun, 17 December 2006 02:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eric.services.ideoform.org

I've struggled with problems like this because there were extra copies
of old versions of files in a CVS/base dir because I had used the
compare editor against the server. Apparently, the faces-config.xml
loader was finding the rouge version in that CVS meta-data directory and
not using the one from my WEB-INF directory.

But unfortunately, I don't think this would be what is causing your problem.

David Kerber wrote:
> I feel silly asking this, because I know it's got to be something stupid
> I'm missing, but I've already spent more time on this than I can really
> aford, and I guess I need somebody to whack me upside the head and tell
> me "you need to change this, stupid!".
>
> Running Eclipse 3.2.1, and I ran the updater this morning, so I should
> have the latest stable releases of Eclipse and the WTP.
>
> This is a webapp project with another project which deploys as a utility
> ..jar, but I run them both in the debugger so I can work on them
> concurrently. I have one utility class that I made changes to yesterday
> (and repeatedly since then) that the changes won't execute in the
> debugger; it keeps executing the previous version of the code, as
> confirmed by watching the debug variables pane and the execution
> location bar in the source pane. I've tried cleaning every project in
> the workspace several times, cleaning eclipse several times, rebooting
> the computer, checking to be sure the source file is writable, deleting
> every .jar it's created that I can find, installing all available
> updates to eclipse, deleting and re-creating the project and everything
> else I can think of short of waving a dead chicken over the keyboard.
>
> What could I be missing???
>
Re: It's baaaaack!: Eclipse won't run updated version of a class [message #185177 is a reply to message #185152] Mon, 18 December 2006 13:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

More observations on this issue:

I have no way of finding the root cause, but the proximate cause of the
trouble getting changed code to execute appears to be that the .jar file
produced from the utility project, which is located in C:\PROJECTS
\workspace3.2.1\.metadata\.plugins\org.eclipse.wst.server.co re\tmp0
\webapps\eddSrv\WEB-INF\lib, is not always being updated when I change
the code in its constituent .java files. As far as I can tell, the
..class files are updated when I do a project "Clean", but they don't
always get posted into the above-mentioned .jar file.

So far (keeping fingers and toes crossed), deleting the jar file before
clicking the "debug" button in Eclipse seems to reliably correct the
trouble.

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Re: Eclipse won't run updated version of a class [message #185258 is a reply to message #185090] Tue, 19 December 2006 21:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse5.rizzoweb.com

David Kerber wrote:
> pane shows the new stuff. I'm about ready to throw this computer
> through the wall and start from a blank HD!! I already tried a clean
> install of Eclipse and recreating the projects from scratch, importing
> only the source into a new workspace.

Not that it relieves your frustration, but I've noted a couple of times
that you are eager to re-install Eclipse when you encounter
difficulties. Let me assure you that re-installing Eclipse is almost
never necessary. Eclipse itself simply does not get corrupted or "messed
up" on any kind of frequent basis. In 4-5 years of usage, I've never
been forced to re-install it (I had to re-create my workspace once or
twice, but that is a different thing, much less drastic).
I think you'll eventually learn that most of your difficulties are
related to configuration errors or misunderstanding of the tool or of
the occasional bug. I will bet you a good dinner that you will never
need to re-install because Eclipse itself got mucked up.

Hope this helps,
Eric
Re: It's baaaaack!: Eclipse won't run updated version of a class [message #185266 is a reply to message #185177] Tue, 19 December 2006 21:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse5.rizzoweb.com

David Kerber wrote:
> More observations on this issue:
>
> I have no way of finding the root cause, but the proximate cause of the
> trouble getting changed code to execute appears to be that the .jar file
> produced from the utility project, which is located in C:\PROJECTS
> \workspace3.2.1\.metadata\.plugins\org.eclipse.wst.server.co re\tmp0
> \webapps\eddSrv\WEB-INF\lib, is not always being updated when I change
> the code in its constituent .java files. As far as I can tell, the
> .class files are updated when I do a project "Clean", but they don't
> always get posted into the above-mentioned .jar file.
>
> So far (keeping fingers and toes crossed), deleting the jar file before
> clicking the "debug" button in Eclipse seems to reliably correct the
> trouble.
>

Is that JAR in a "plain" Java project that is listed as a dependency of
your web project? Unless it is, I don't think anything in WTP will build
the JAR automatically. Certainly JDT won't do it - JDT only compiles to
..class files.

Hope this helps,
Eric
Re: It's baaaaack!: Eclipse won't run updated version of a class [message #185294 is a reply to message #185266] Wed, 20 December 2006 00:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ns_dkerber.ns_WarrenRogersAssociates.com

In article <em9mph$o9j$2@utils.eclipse.org>, eclipse5@rizzoweb.com
says...
> David Kerber wrote:
> > More observations on this issue:
> >
> > I have no way of finding the root cause, but the proximate cause of the
> > trouble getting changed code to execute appears to be that the .jar file
> > produced from the utility project, which is located in C:\PROJECTS
> > \workspace3.2.1\.metadata\.plugins\org.eclipse.wst.server.co re\tmp0
> > \webapps\eddSrv\WEB-INF\lib, is not always being updated when I change
> > the code in its constituent .java files. As far as I can tell, the
> > .class files are updated when I do a project "Clean", but they don't
> > always get posted into the above-mentioned .jar file.
> >
> > So far (keeping fingers and toes crossed), deleting the jar file before
> > clicking the "debug" button in Eclipse seems to reliably correct the
> > trouble.
> >
>
> Is that JAR in a "plain" Java project that is listed as a dependency of
> your web project? Unless it is, I don't think anything in WTP will build

Yes, it is. Most of the time, it builds automatically when necessary.
It's just once in a while (probably once or twice a day) that it seems
to lose track of the fact that something has changed in the classes that
make up that .jar, and therefore the jar should be rebuilt. Either
that, or the .jar has become locked and it is unable to replace it.
That seems unlikely, however, since I have never had trouble deleting
the .jar through windows explorer.

> the JAR automatically. Certainly JDT won't do it - JDT only compiles to
> .class files.


--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Re: Eclipse won't run updated version of a class [message #186340 is a reply to message #185066] Tue, 16 January 2007 21:03 Go to previous message
Eclipse UserFriend
Originally posted by: pmarnellremote.yahoo.com

I'll weigh in here...after days and days of wrestling with this exact
problem.

I began with the assumption that it was something that I had messed up,
but now I see it's something more.

I have followed all of the steps in this thread, including
uninstalling/installing - in the process going from 3.1.9 (I think) to 3.2.

I've tried all of Mr. Kerber's methods and suggestions of
starting/stopping the debugger, building/rebuilding, etc.

I deleted all of the Eclipse resource files, all the class path and
project files - pared all the way back just to the source, then started
again with a new workspace and new projects.

I get the same result: the version of the program picked up as the class
is different from the version in the java source.

I decompiled the jar to see what was in it, and it is identical to the
source in Eclipse (i.e. it's different from the class being picked up by
the debugger, and by tomcat)!

Another wrinkle (like Mr. K's case, I think): the remote site is totally
unaffected this way; it's only the local machine tomcat that is acting
up. Unfortunately, debugging the remote site is so dog-slow it's not
practical (at least it wasn't until today - at least it works).

This has been a problem for awhile, as I look back. But in the past the
nature of the changes allowed me to skirt the issue and work with the slow
remote debug. That's not really attractive now, and it forced me to look
into this, and it's a real, royal, pain.

It seems to me this *must* be something stuck inside the local tomcat, not
in the Eclipse piece (since that's pretty much refreshed).

Any other ideas?
Previous Topic:Tomcat 6 server
Next Topic:Project-wide validator?
Goto Forum:
  


Current Time: Thu Apr 18 18:23:35 GMT 2024

Powered by FUDForum. Page generated in 0.03527 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top