Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ClassCastException, while doing weblogic 6.0sp1 RMI Call-back from within the thread.

0 views
Skip to first unread message

ramesh krishnan

unread,
Apr 30, 2001, 7:45:03 AM4/30/01
to

hello,

i am trying to get RMI call-back using bea weblogic 6.0sp1 RMI.
my RMI application architecture is having Applet at one end and remote server
at another end running with weblogic.
i've got the client(applet) registered with the remote server through remote invoking.
but while doing call-back to the applet from within the thread running from server-side,
it throws the ClassCastException as follows.

java.lang.ClassCastException: java.lang.Thread
at weblogic.servlet.internal.HttpServer.logToFile(HttpServer.java:1000)
at weblogic.servlet.internal.HttpServer.log(HttpServer.java:944)
at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:843)
at weblogic.rjvm.http.HTTPServerJVMConnection.sendMsg(HTTPServerJVMConnection.java:361)
at weblogic.rjvm.MsgAbbrevJVMConnection.sendOutMsg(MsgAbbrevJVMConnection.java:367)
at weblogic.rjvm.MsgAbbrevJVMConnection.sendMsg(MsgAbbrevJVMConnection.java:173)
at weblogic.rjvm.ConnectionManager.sendMsg(ConnectionManager.java:482)
at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:419)
at weblogic.rjvm.MsgAbbrevOutputStream.flushAndSendRaw(MsgAbbrevOutputStream.java:114)
at weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:122)
at weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:144)
at weblogic.rmi.internal.AbstractOutboundRequest.sendReceive(AbstractOutboundRequest.java:84)
at com.atroad.adm.asap.outage.client.Broker_WLStub.callBackRMIclient(Broker_WLStub.java:87)
at com.atroad.adm.asap.outage.server.NotifierImpl.run(NotifierImpl.java:40)
at java.lang.Thread.run(Thread.java:484)

where the run method <NotifierImpl.run> in last but one line is the implementation
of the threads run method where it calls back the applet and NotifierImpl is the
RMI remote server implementation. the same system works fine when not using thread.

i have checked with java RMI as well involving thread, it works there but not
with the weblogic RMI i observed.
can anyone suggest to fix this out.

Note: to be more informative, i have followed the Weblogic6.0 spec that to have
imported/used java rmi package except for UnicastRemoteObject which is from weblogic
package.
and also having jndi instead of *.rmi.Naming service.

Thanks,
ramesh k.
@Road Software India pvt. ltd.

ramesh krishnan

unread,
Apr 30, 2001, 7:46:58 AM4/30/01
to

code segment:-
................................................................Broker rmiClientProxy;
Thread notifier;
public class NotifierImpl extends weblogic.rmi.server.UnicastRemoteObject
implements Notifier, Runnable
{
public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";

NotifierImpl () throws RemoteException
{
super();
}

public void register(Broker rmiClientProxy)
{
this.rmiClientProxy = rmiClientProxy;
if(notifier==null)
{
notifier=new Thread(this, "callback");
notifier.start();
}
}

public void run()
{
while (true)
{
if(rmiClientProxy!=null)
{
System.out.println("###### remote invoking rmiClient.");
rmiClientProxy.callBackRMIclient();
rmiClientProxy=null;
System.out.println("###### remote invoked rmiClient.");
}
}
}
................................................................

0 new messages