For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 8 replies, 3 voices, and was last updated 19 years, 7 months ago by
sandeepraghav.
-
AuthorPosts
-
ksgettingParticipantMy operating system is Win XP. I use smart deployment for dependant projects. Earlier this week I upgraded from MyEclipse 3.8.5 to 4.0.3 GA. I also had updated Eclipse to 3.1. Today I upgraded my Tomcat from 5.0 to 5.5. I was hoping that hot code replacement would be more tolerant of java code changes (hot method replacement). Instead I find that normal code replacement is not working the best.
Initially when a start the Tomcat server, my web project works fine. I make a few code changes and they get picked up (I step through code just changed to verify). But after several code changes, my changes are no longer getting picked up. I can see that the new class files are deployed to my Tomcat directories. But stepping through my code (debug) shows that I appear to be still running the older version (based on variable values and the wrong line getting highlighted). I even had trouble once where my breakpoints were getting completely ignored. But the debug window does not show any threads being out of synch (nor should they be since I have not alter any method signatures or alter any member variables).
Once I stopped and restarted Tomcat. everything works fine again, picking up my breakpoints and latest code.
Am I missing something? Is there a setting wrong somewhere or perhaps Tomcat 5.5 requires some other attribute to be set somewhere that Tomcat 5.0 does not require?
December 11, 2005 at 10:31 am #242977
Scott AndersonParticipantThere are a couple of things I can think of. First, what version of the JDK are you using to run both Eclipse and Tomcat? They should be the same for maximum compatibility for hot code replacement since this is handled exclusively at the JDK level. The other thing that comes to mind is that you might have told Eclipse to *not* tell you when hot code replacement fails and it’s simply failing silently. Check the setting at “Window > Preferences > Java > Debug > Show error when hot code replacement fails” to see if this is the case.
December 12, 2005 at 7:58 am #242985
ksgettingParticipantTomcat is running Java 1.5 (just upgraded Tomcat last week to 5.5 from 5.0.28 with Java 1.4.2). The JRE eclipse runs on (…\eclipse\jre) was 1.4. The Installed JRE (Preferences -> Java -> Installed JRE was poimnting to SDK 1.4.2. Not sure which you were referring to, although I assume the latter.
I had a problem last week where suddenly I could not get MyEclise or Eclipse to run. Eclipse kept complaining about the jre missing from “…\eclipse\jre”. I tried supplying a jre parameter to the MyEclipse shortcut, but that failed. So I tried updating MyEclipse to 4 from 3.8.5 (along with Eclipse from 3.0 to 3.1). That failed to start as well with the same error. I finally copied a jre folder from an older (unused) version of Eclipse, which fixed the startup error. Not sure how the problem was trigger for sure, but suspect it had something to do with an auto-update of Java 1.5 earlier in the day that failed to run. I finally fixed the Java problem on Friday (all java updates were failing until I turned off Google desktop and rebooted – Google was locking the install library).
I updated the jre directory and now point my installed JRE to SDK 1.5. I’ll let you know of the results later when I use the debugger.
December 16, 2005 at 11:46 am #243220
ksgettingParticipantI don’t see any change in behavior. I still see the same problem without any notification of hot code replacement failing.
December 16, 2005 at 5:24 pm #243251
Scott AndersonParticipantTo recap, you’re now running both Eclipse and Tomcat with JDK 1.5? You can verify the Eclipse SDK being used at Help > About Eclipse SDK > Configuration Details.
Also, what exact change are you trying where hot replacement is failing? There are limitations to what the JVM supports so that might be the case. Finally, can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some additional information so we can look deeper.
December 19, 2005 at 7:25 am #243341
ksgettingParticipantCorrect. Both are 1.5. I am just trying to change java code inside a method. No hot method replacement error occurs. Posting the information below. I hope dumping everything in the error log is not too much. 🙂
*** Date: Mon Dec 19 07:07:56 CST 2005
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_06*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.0.3 GA
Build id: 20051025-4.0.3-GA*** Eclipse details:
Eclipse SDKVersion: 3.1.1
Build id: M20050929-0840Eclipse Platform
Version: 3.1.1
Build id: M20050929-0840Eclipse RCP
Version: 3.1.1
Build id: M20050929-0840Eclipse Java Development Tools
Version: 3.1.1
Build id: M20050929-0840Eclipse Plug-in Development Environment
Version: 3.1.1
Build id: M20050929-0840Eclipse Project SDK
Version: 3.1.1
Build id: M20050929-0840Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\apps\Eclipse 3.1\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
c5c_44
-vm
C:\apps\Eclipse 3.1\jre\bin\javaw.exeERROR LOG:
!SESSION 2005-12-16 16:15:59.343 ———————————————–
eclipse.buildId=M20050929-0840
java.version=1.5.0_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86This is a continuation of log file C:\data\workspace.6.3.5\.metadata\.bak_0.log
Created Time: 2005-12-16 16:25:54.312<log messages elided by admin>
December 20, 2005 at 9:09 am #243437
Scott AndersonParticipantNow that both are running JDK 1.5 are you still seeing this behavior:
But after several code changes, my changes are no longer getting picked up. I can see that the new class files are deployed to my Tomcat directories. But stepping through my code (debug) shows that I appear to be still running the older version (based on variable values and the wrong line getting highlighted). I even had trouble once where my breakpoints were getting completely ignored. But the debug window does not show any threads being out of synch (nor should they be since I have not alter any method signatures or alter any member variables).
What I’m getting at is that the changes work and then they stop for some reason? I saw behavior like this on earlier JDK 1.5 builds but not recently. Since updates to running Java code are handled by a combination of the Eclipse debugger and the JVM (not MyEclipse) the issue is likely one of those recent version changes. I’d suspect the JDK first and I’d recommend trying to launch both Eclipse and Tomcat with the latest release of JDK 1.4.2 to see if the behavior is different.
That failed to start as well with the same error. I finally copied a jre folder from an older (unused) version of Eclipse, which fixed the startup error. Not sure how the problem was trigger for sure, but suspect it had something to do with an auto-update of Java 1.5 earlier in the day that failed to run. I finally fixed the Java problem on Friday (all java updates were failing until I turned off Google desktop and rebooted – Google was locking the install library).
Copying around the jre subdirectory could also have corrupted Eclipse in some way. Can you create a new Web project containing a small webapp with one java file, deploy it exploded to Tomcat, and see if hot code replace works with it? If not, can you create a new workspace, add the same test project to it, and then test it there? This will isolate whether the issue is with your java file, your project, your workspace, or your install. If the problem is across the install then a new Eclipse 3.1.1 / MyEclipse 4.0.3 installation would likely be required, unfortunately.
December 20, 2005 at 10:34 am #243446
ksgettingParticipantI will try changing eclipse/tomcat to use JDK 1.4.2 to see if that fixes it first. Thanks!
January 30, 2006 at 11:52 am #245651
sandeepraghavMembertry applying JVM argument in eclipse as : -Xdebug -Xj9
-
AuthorPosts