incubator-yoko-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick McGuire <>
Subject Help with RMI problem needed.
Date Tue, 28 Nov 2006 20:53:01 GMT
I'm stuck on an RMI problem where I've sort of figured out why it's 
failing, but I don't have a clue on what the fix needs to be.  The 
problem is essentially occurring on a method call where an RMI object is 
getting passed to the server as an argument.  This is resulting in an 
exception when Stub.connect() is called because the object delegate is null:

|org.omg.CORBA.BAD_OPERATION:  vmcid: 0x0 minor code: 0x0  completed: No|
|    at org.omg.CORBA.portable.ObjectImpl._get_delegate(|
|    at org.apache.yoko.rmi.impl.RMIStub._get_delegate(|
|    at org.apache.yoko.rmi.impl.StubImpl.connect(|
|    at javax.rmi.CORBA.Stub.connect(

The object's delegate is set to null during processing of a call to 
PortableRemoteObject.narrow() resulting from a call to 
RMIPersistentStub.readResolve().   The value used on the set call is null.

|at org.apache.yoko.rmi.impl.RMIStub._set_delegate(|
|    at org.apache.yoko.rmi.impl.PortableRemoteObjectImpl.narrow(|
|    at javax.rmi.PortableRemoteObject.narrow(|
|    at org.apache.yoko.rmi.impl.RMIPersistentStub.readResolve(|
|    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)|
|    at sun.reflect.NativeMethodAccessorImpl.invoke(|
|    at sun.reflect.DelegatingMethodAccessorImpl.invoke(|
|    at java.lang.reflect.Method.invoke(|
|    at|
|    at|
|    at|
|    at

This is occurring because this code in PortableRemoteObjectImpl.narrow() 
is getting the BAD_OPERATION exception because the object in question 
has not had a delegate set. 

            org.omg.CORBA.portable.Delegate delegate;
            try {
                // let the stub adopt narrowFrom's identity
                delegate = object._get_delegate();

            } catch (org.omg.CORBA.BAD_OPERATION ex) {
                // ignore
                delegate = null;

It appears that the reason this has not had a delegate set is because 
the RMIPersistentStub instance was instantiated during the 
deserialization process using the default constructor, which does not 
set a delegate. 

So, what should be happening here?  This test case is unfortunately part 
of the tck, so I can't really give a lot of details out except to people 
who have signed the tck NDA. 



View raw message