MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to General Development
View previous topic Printable version Log in to check your private messages View next topic
Author Message
harryajh
Post subject: [Workaround] CCE after Hot Swap on Weblogic 8.1  PostPosted: Sep 06, 2005 - 05:49 PM
Veteran Member
Veteran Member


Joined: Jan 17, 2004
Posts: 154

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!

harry
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Sep 06, 2005 - 06:02 PM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6761

Harry,

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).

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
harryajh
Post subject:   PostPosted: Sep 07, 2005 - 04:44 PM
Veteran Member
Veteran Member


Joined: Jan 17, 2004
Posts: 154

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!
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
harryajh
Post subject:   PostPosted: Sep 07, 2005 - 04:48 PM
Veteran Member
Veteran Member


Joined: Jan 17, 2004
Posts: 154

Just noticed also & even more worrying is even with the server launched in "Run Mode" it still throws the error!
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Sep 08, 2005 - 12:38 AM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6761

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.

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
harryajh
Post subject:   PostPosted: Sep 08, 2005 - 11:39 AM
Veteran Member
Veteran Member


Joined: Jan 17, 2004
Posts: 154

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!

many thanks for you help Scott anyway!

harry
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
harryajh
Post subject:   PostPosted: Sep 08, 2005 - 12:16 PM
Veteran Member
Veteran Member


Joined: Jan 17, 2004
Posts: 154

ah 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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
daorriss
Post subject:   PostPosted: Sep 08, 2005 - 03:57 PM
Registered Member
Registered Member


Joined: Aug 10, 2005
Posts: 255

Harry,

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

_________________
DaveO

The delusion that people care about what I think:
http://www.codethought.com/blog
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
daorriss
Post subject:   PostPosted: Sep 10, 2005 - 03:20 AM
Registered Member
Registered Member


Joined: Aug 10, 2005
Posts: 255

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???

_________________
DaveO

The delusion that people care about what I think:
http://www.codethought.com/blog
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Sep 10, 2005 - 06:02 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

DaveO,
You mean ME is not syncing out the class to the server, or WL is no longer reloading the changes?

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
daorriss
Post subject:   PostPosted: Sep 11, 2005 - 09:26 PM
Registered Member
Registered Member


Joined: Aug 10, 2005
Posts: 255

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.. ;)

_________________
DaveO

The delusion that people care about what I think:
http://www.codethought.com/blog
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits