-
Bug
-
Resolution: Fixed
-
P2
-
1.3.0
-
merlin
-
sparc
-
solaris_7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2035720 | 1.4.0 | Ken Cavanaugh | P2 | Closed | Fixed | beta2 |
Name: cl74495 Date: 07/26/2000
Running the examples.hello.HelloServer program with a different ORB
hosting rmi causes a client using the 1.3 ORB to get a BAD_OPERATION
exception.
java -Dorg.omg.CORBA.ORBClass=blahblah -Dorg.omg.CORBA.ORBSingletonClass=blahblah -Djavax.rmi.CORBA.StubClass=blahblah -Djavax.rmi.CORBA.PortableRemoteObjectClass=blahblah -Djavax.rmi.CORBA.UtilClass=blahblah examples.hello.HelloServer
(server stub is serialized and written to a file read by HelloClient)
java examples.hello.HelloClient
java.rmi.RemoteException: CORBA BAD_OPERATION 0
at com.sun.corba.se.internal.javax.rmi.CORBA.StubDelegateImpl.connect(StubDelegateImpl.java:256)
at javax.rmi.CORBA.Stub.connect(Stub.java:151)
at examples.hello.HelloClient.go(HelloClient.java:43)
at examples.hello.HelloClient.main(HelloClient.java:25)
This is happening because the StubDelegateImpl expects
CDRInputStream's read_Object() method to return an
org.omg.CORBA_2_3.portable.ObjectImpl but it returns an
org.omg.CORBA.portable.ObjectImpl, causing a class cast exception
that is caught and turned into a BAD_OPERATION exception in
StubDelegateImpl.
This breaks interoperation when the client obtains server references
via serialized stubs.
The fix is very simple and affects only one line of code - change
com.sun.corba.se.internal.iiop.CDRInputStream to use the CORBA_2_3
ObjectImpl interface in loadStub() instead of the older CORBA
ObjectImpl interface:
line 690:
// Return the "default" stub...
ObjectImpl objref = new org.omg.CORBA_2_3.portable.ObjectImpl() {
public String[] _ids() {
String[] typeids = new String[1];
typeids[0] = "IDL:omg.org/CORBA/Object:1.0";
return typeids;
}
};
(Review ID: 107419)
======================================================================
- backported by
-
JDK-2035720 BAD_OPERATION in examples.hello interoperation
-
- Closed
-