- This topic has 10 replies, 4 voices, and was last updated 19 years, 10 months ago by
David Orriss Jr.
-
AuthorPosts
-
harryajhMemberUsing 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!
harry
September 6, 2005 at 12:02 pm #236724
Scott AndersonParticipantHarry,
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).
September 7, 2005 at 10:44 am #236805
harryajhMemberThanks 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!
September 7, 2005 at 10:48 am #236808
harryajhMemberJust noticed also & even more worrying is even with the server launched in “Run Mode” it still throws the error!
September 7, 2005 at 6:38 pm #236846
Scott AndersonParticipantHarry,
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.
September 8, 2005 at 5:39 am #236858
harryajhMemberI 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!
many thanks for you help Scott anyway!
harry
September 8, 2005 at 6:16 am #236860
harryajhMemberah ha! – found this thread http://forums.bea.com/bea/message.jspa?messageID=202247822&tstart=0 – added
<container-descriptor>
<servlet-reload-check-secs>-1</servlet-reload-check-secs>
</container-descriptor>to weblogic.xml & works perfectly – probably makes more sense to you but all I care about is it works!
many thanks for your help!
harry
September 8, 2005 at 9:57 am #236884
David Orriss JrParticipantHarry,
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=0
September 9, 2005 at 9:20 pm #237039
David Orriss JrParticipantY’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???
September 10, 2005 at 12:02 am #237040
Riyad KallaMemberDaveO,
You mean ME is not syncing out the class to the server, or WL is no longer reloading the changes?September 11, 2005 at 3:26 pm #237067
David Orriss JrParticipantWL 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.. 😉
-
AuthorPosts