users@shoal.java.net

Re: [Shoal-Users] Timer automigration failed with "ClassCastException"

From: Shreedhar Ganapathy <Shreedhar.Ganapathy_at_Sun.COM>
Date: Sun, 01 Feb 2009 21:12:09 -0800

Hi Jason
CC'd Mahesh who is familiar with the GF timer migration implementation.

Jason, Could you point us to the sources ? Are these from the GF tip or
a branch ? Also on what version of GF are you experiencing this ?

Is this a custom class you have written or is it part of GF sources?


Thanks
Shreedhar
shockwave_115_at_hotmail.com wrote:
> Hi
> We plan to use the timer auto-migration feature of glassfish, but it
> failed, after I check the code I found the "ClassCastException":
> [#|2009-02-02T12:27:44.542+0800|INFO|sun-appserver9.1|ShoalLogger|_ThreadID=19;_ThreadName=com.sun.enterprise.ee.cms.impl.common.Router
> Thread;instance1;|Sending FailureSuspectedSignals to registered
> Actions. Member:instance1...|#]
> [#|2009-02-02T12:27:44.566+0800|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=19;_ThreadName=com.sun.enterprise.ee.cms.impl.common.Router
> Thread;_RequestID=faebc022-acef-45b5-b14f-c025c8a6d0aa;|Exception in
> thread "com.sun.enterprise.ee.cms.impl.common.Router Thread" |#]
> [#|2009-02-02T12:27:44.578+0800|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=19;_ThreadName=com.sun.enterprise.ee.cms.impl.common.Router
> Thread;_RequestID=faebc022-acef-45b5-b14f-c025c8a6d0aa;|java.lang.ClassCastException:
> timer.TimerFailureNotificationAction cannot be cast to
> com.sun.enterprise.ee.cms.core.FailureSuspectedAction
> at
> com.sun.enterprise.ee.cms.impl.common.Router.notifyFailureSuspectedAction(Router.java:299)
> at
> com.sun.enterprise.ee.cms.impl.common.SignalHandler.analyzeSignal(SignalHandler.java:120)
> at
> com.sun.enterprise.ee.cms.impl.common.SignalHandler.handleSignals(SignalHandler.java:103)
> at
> com.sun.enterprise.ee.cms.impl.common.SignalHandler.run(SignalHandler.java:85)
> at java.lang.Thread.run(Thread.java:619)
> |#]
> I check the source code "Router" expect a "FailureSuspectedAction" but
> got a "TimerFailureNotificationAction", from the interface description
> of "FailureSuspectedActionFactory ", "Action" is the return type of
> "FailureSuspectedActionFactory.produceAction()".
> void notifyFailureSuspectedAction(final FailureSuspectedSignal signal) {
> FailureSuspectedAction a;
> FailureSuspectedSignal fss;
> logger.log(Level.INFO, "failuresuspectedsignals.send.member",
> new Object[]{signal.getMemberToken()});
> synchronized (failureSuspectedAF) {
> for (FailureSuspectedActionFactory fsaf : failureSuspectedAF) {
> a = (FailureSuspectedAction) fsaf.produceAction();
> fss = new FailureSuspectedSignalImpl(signal);
> callAction(a, fss);
> }
> }
> }
> So is it a bug of glassfish or shoal?
> BRs
> //Jason