Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

_Stub: no delegate set problem in WebSphere 5.1

 
Suttan Pym
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3892
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Suttan Pym
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4982
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Suttan Pym
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 166
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Suttan Pym
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
we are facing the same issue with websphere 5.1 . Were you able to find a solution ?

thanks
Satish
 
Suttan Pym
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Suttan Pym
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic