aspose file tools*
The moose likes Websphere and the fly likes _Stub: no delegate set problem in WebSphere 5.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "_Stub: no delegate set problem in WebSphere 5.1" Watch "_Stub: no delegate set problem in WebSphere 5.1" New topic
Author

_Stub: no delegate set problem in WebSphere 5.1

Suttan Pym
Ranch Hand

Joined: Jan 30, 2003
Posts: 46
Hi,
I am using WAS 5.1 with Oracle 9i and both in Windows 2000.
We have an application which has few SessionBeans, MDBs and EntityBeans. We are running a performance test and calling few API's on a SessionBean from the client side.
Now after running the test when we are trying to access a SessionBean from the client we are able to access and call methods on it. But when we try to lookup the same SessionBean from a helper class within the AppServer we get the error pasted below. On of IBM document (RMI-IIOP Programmer's Guide) gives few information in the section (Connecting IIOP stubs to the ORB). It mentions that:
The connect method makes the stub ready for remote communication using the specified ORB object orb. Connection normally happens implicitly when the stub is received or sent as an argument on a remote method call, but it is sometimes useful to do this by making an explicit call (e.g., following deserialization). If the stub is already connected to orb (i.e., has a delegate set for orb), then connect takes no action. If the stub is connected to some other ORB, then a RemoteException is thrown. Otherwise, a delegate is created for this stub and the ORB object orb.
For servants that are not POA-activated, Stub.connect(orb) is necessary as a required setup

ERROR:
20 Jan 2004 14:56:57,531 BizLogic FATAL - (5004):BizLogic Server Startup failed at <1/20/04 2:56 PM>; context(BLControl.init)(1527):Failed to look-up <BLServerHome> from JNDI service.; context(WFJavaScript.init)CORBA BAD_OPERATION 0x0 No; nested exception is:
org.omg.CORBA.BAD_OPERATION: The delegate has not been set! vmcid: 0x0 minor code: 0 completed: No
com.savvion.sbm.bizlogic.util.BizLogicException: (1527):Failed to look-up <BLServerHome> from JNDI service.; context(WFJavaScript.init)CORBA BAD_OPERATION 0x0 No; nested exception is:
org.omg.CORBA.BAD_OPERATION: The delegate has not been set! vmcid: 0x0 minor code: 0 completed: No
at com.savvion.sbm.bizlogic.server.WFJavaScript.init(WFJavaScript.java:410)
at com.savvion.sbm.bizlogic.util.BLControl.init(BLControl.java:380)
at com.savvion.sbm.bizlogic.util.BLControl.start(BLControl.java:413)
at com.savvion.sbm.bizlogic.util.BLControl.start(BLControl.java:400)
at com.savvion.sbm.bizlogic.server.ejb.BLServerBean.start(BLServerBean.java:200)
at com.savvion.sbm.bizlogic.server.ejb.EJSRemoteStatelessBLServerBean_e586166b.start(Unknown Source)
at com.savvion.sbm.bizlogic.server.ejb._EJSRemoteStatelessBLServerBean_e586166b_Tie.start(_EJSRemoteStatelessBLServerBean_e586166b_Tie.java:680)
at com.savvion.sbm.bizlogic.server.ejb._EJSRemoteStatelessBLServerBean_e586166b_Tie._invoke(_EJSRemoteStatelessBLServerBean_e586166b_Tie.java(Compiled Code))
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java(Compiled Code))
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java(Compiled Code))
at com.ibm.rmi.iiop.ORB.process(ORB.java(Compiled Code))
at com.ibm.CORBA.iiop.ORB.process(ORB.java(Compiled Code))
at com.ibm.rmi.iiop.Connection.doWork(Connection.java(Compiled Code))
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java(Compiled Code))
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Regards and Thanks,
Suttan
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
I have never, ever found it necessary to use Stub.connect(). Can you please post the offending code so that I can see what you're doing and suggest an alternative?
Thanks.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Suttan Pym
Ranch Hand

Joined: Jan 30, 2003
Posts: 46
Hi Kyle,
The code where the lookup is done is :
//get the context from cache or by lookup.
InitialContext ctx = null;
Object home = null;
if (user != null && passwd != null) {
ctx = ServiceLocator.self().getInitialContext(appServer, user,
passwd, remoteClient);
}
else {
ctx = ServiceLocator.self().getInitialContext(appServer,
remoteClient);
}
Object remoteObjRef = ctx.lookup(jndiName);
home = (Object) javax.rmi.PortableRemoteObject.narrow
(remoteObjRef, object);

This is within a method. Here we return the home interface. This method is called from different places in the code. There they just get the HomeInterface and call create() on it.
Regards and Thanks,
Suttan
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
Hi Suttan,
I dont think we need to invoke Stub.connect(orb) explicitly in our programs. I dont know whether it is really invoked or not, but I am sure even we need to invoke this, it is the responisibilty of the EJB container!
So, I guess your case should be the JNDI naming issues. You may bind one of your EJB beans to a certain name in the deployment discriptor, so, could you check whether the JNDI name is binded to DD correctly?
or if it is an EntityBean, you may also check whether your EntityBean has specified the mapping with DB successfully? Make sure that, for EntityBean, you need to bind it with your primary key of the table.
Or, please provide the DD so that we can further assist you.
Nick.


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Suttan Pym
Ranch Hand

Joined: Jan 30, 2003
Posts: 46
Hi Nick,
Actually I do not think there any issues with the DDs. The reason is that the same sequence of activities runs without any issues before running of the stress test. But the behaviour starts appearing only after the stress test. The stress test involves lots of SessionBean, EntityBean, JMS and also database calls. It is after this test is completed, this error and such erroneous behaviour starts. Is it something to do with the JNDI tree reaching an unstable state or something of that sort? And the surprising thing is that the lookup fails only if it done within the container but from the client side the lookup works.
Serge Adzinets
Ranch Hand

Joined: Nov 26, 2002
Posts: 166
Hi, Suttan,
If you have this problem only under the stress test, then I guess you might experience synchronization problems. Check that ServiceLocator and other classes are properly synchronized.


Best Regards,<br />Serge
Suttan Pym
Ranch Hand

Joined: Jan 30, 2003
Posts: 46
Hi Serge,
Yes I went through the code once again. As such I did not see any problems related to Synchronize. The doubt arises when we lookup the HomeInterface and do a toString() on that object we get the following:
com.savvion.sbm.bizlogic.server.ejb._BLServerHome_Stub: no delegate set
The statement "no delegate set" comes in the end. This gives me the suspision that the HomeInterface which we get from the AppServer itself is not a valid one.
Regards and Thanks,
Suttan
satish gopalakrishnan
Greenhorn

Joined: Mar 11, 2002
Posts: 6
Hi,
we are facing the same issue with websphere 5.1 . Were you able to find a solution ?

thanks
Satish
Suttan Pym
Ranch Hand

Joined: Jan 30, 2003
Posts: 46
Hi Satish,
Yes, I found the solution for the problem. It was a BUG in WebSphere and IBM had provided us with a patch for the same. Maybe you will be required to contact IBM for the patch.

Regards,
Suttan
vkl
Greenhorn

Joined: Sep 30, 2002
Posts: 1
Hi Suttan/Satish
We are also facing the same issue with WAS 5.0 running on AIX. This problem comes only when we do stress test. What is the version of WAS you are using and What is the version of Patch which u have applied to resolve this problem.

will Appreciate your help

Thanks
Vikal


Vikal
Suttan Pym
Ranch Hand

Joined: Jan 30, 2003
Posts: 46
Hi,

For this problem we got a patch from IBM. The patch basically was a updated ibmorb.jar. We had faced this problem with WAS 5.1.

Regards,
Suttan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: _Stub: no delegate set problem in WebSphere 5.1