MyEclipse: [Workaround] CCE after Hot Swap on Weblogic 8.1 harryajh - Sep 06, 2005 - 05:49 PM Post subject: [Workaround] CCE after Hot Swap on Weblogic 8.1
Using Eclipse 3.1, ME 4 GA, Weblogic 8.1 (sp3) on win 2000 (sp4)
I have a Struts app (not that I think that make any difference?) - if I modify (Hot Swap) the "execute" method in any of the Action classes, activating any action after produces -
java.lang.ClassCastException at org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:855)
............
I HAVE to redeploy the app EVERY single time to want to see the effects of ANY changes!
I'm sure (pretty sure!) this used to work before I tried several of the ME 4 milestone builds & have no idea why it is doing it?
Can you help at all?
cheers
P.S read a previous similar post "NoClassDefFoundError after hot swap" from "schuer" but this was to do with sp2 - I'm 99.9% sure this to work fine under sp3!
We haven't changed any of this tooling for the deployment, and the actual injection of the new class into the remote JVM is handled by the JVM's themselves. Given what you're seeing, I'd guess that you're using different JDK's for running WebLogic than you're using to compile the code within Eclipse or that you're somehow using different libraries in deployment than in development (which would really be odd).harryajh - Sep 07, 2005 - 04:44 PM Post subject:
Thanks for your reply scott but checked everything & all up to date & correct versions - even tried WL 8.1 (sp1) & WL 8.1 (sp4) and then fresh install on different PC but always the same - ANY change to an action class gives this error!
If anyone's out there with the same versions as me perhaps they can confirm whether this should work or not? - is it me or just more broken Java stuff?
For now I'll just have to put this down to a typical "3 steps forward 2 steps back" java thing & redeploy every single time!harryajh - Sep 07, 2005 - 04:48 PM Post subject:
Just noticed also & even more worrying is even with the server launched in "Run Mode" it still throws the error!support-scott - Sep 08, 2005 - 12:38 AM Post subject:
Harry,
Quote:
Just noticed also & even more worrying is even with the server launched in "Run Mode" it still throws the error!
Actually, that's not so troubling. Launching in Run mode only turns of breakpoints, not sycing of classes when modified.
One thing to try would be to create a new, basic Struts project (something very simple) and see if changing an action class in there has the same effect. If different, then it's a project configuration issue. Also, what JDK are you using? For WebLogic, we recommend running it with the 1.4.2 release that comes with it.harryajh - Sep 08, 2005 - 11:39 AM Post subject:
I start Eclipse with j2sdk1.4.2_08 & Weblogic uses jdk142_04 (although I have tried it with j2sdk1.4.2_08)
This is very odd! - created a new web project with struts etc... & created a new action class (with the same class name as one from my main project so I could pinch the struts-config.xml stuff!). Setup a dummy jsp page & placed a breakpoint in the "execute" method - when the debugger stops it load the original class not my test one!
So started eclipse with -clean option & renamed the test class - this time it stopped 1st time (in the correct class) but when I made a change & clicked my test button guess what? "ClassCastException"
Something else odd, the 1st time I made a change eclipse reported the "hot swap" failed but does not show it again even though I did not check the "ignore" button on the dialog box!
It looks like it just doesn't work!, unless you can think of anything else to try? its back to "redeploy city" - it I ever find out whats wrong I'll post back here!
BEA explains it here (later in the same thread, actually). Basically, there's a bug in WLS.
http://forums.bea.com/bea/message.jspa?messageID=202429027&tstart=0daorriss - Sep 10, 2005 - 03:20 AM Post subject:
Y'know I'm running into this exact problem. And the workaround works... *except* that now my class changes don't hot-deploy. Am I missing something???support-rkalla - Sep 10, 2005 - 06:02 AM Post subject:
DaveO,
You mean ME is not syncing out the class to the server, or WL is no longer reloading the changes?daorriss - Sep 11, 2005 - 09:26 PM Post subject:
WL is no longer reloading the changes...
[EDIT] Scratch that... maybe I just needed to do a complete undeploy-and-redeploy. It's working just fine now. Just have to remember to remove that when I make my final package.. ;)