Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4434140
Votes 0
Synopsis JDK 1.3 <-> JDK 1.3.1 interop issue with writeUTF/readUTF in RMI-IIOP
Category idl:orb
Reported Against ladybird-rc1
Release Fixed 1.3.1(1.3.1_01)
State 11-Closed, Verified, bug
Priority: 4-Low
Related Bugs
Submit Date 04-APR-2001
Description
There is an interoperability issue between JDK 1.3 and JDK 1.3.1 in the following two failure scenarios:

Failure scenario 1:

1) JDK 1.3.1 server which hasn't connected to JDK 1.3 or JDK 1.3.1 yet
2) JDK 1.3 client makes a call
3) JDK 1.3.1 client tries to send a custom marshaled object which calls
writeUTF/readUTF on the ObjectOutputStream/ObjectInputStream

--> MARSHAL exception

Failure scenario 2:

1) JDK 1.3.1 server which hasn't connected to JDK 1.3 or JDK 1.3.1 yet
2) JDK 1.3.1 client makes a call
3) JDK 1.3 client tries to send a custom marshaled object which calls
writeUTF/readUTF on the ObjectOutputStream/ObjectInputStream

Note:  There was a bug in JDK 1.3's RMI-IIOP implementation in which writeUTF and readUTF couldn't handle Strings with characters greater than 8 bits.  This was fixed in JDK 1.3.1 with the exception of the above interop problem with JDK 1.3.

-----

This happens because a reference to the stream class is kept in a static variable in com.sun.corba.se.internal.io.ValueHandlerImpl.CreateIIOPInputStream and CreateIIOPOutputStream.  If JDK 1.3 connects first, the variable is permanently set to the JDK 1.3 stream class.

************************************************************************
 xxxxx@xxxxx  2001-08-02

Verification of Interop Test 
tests/product/serial/interop
between ladybird (jdk 1.3.1_01) 
and kestrel(jdk1.3.0) Done Successfully

-Build: j2sdk-1_3_1_01-fcs-bin-solsparc-27_jun_2001
-Build: j2sdk1_3_0fcs-c-bin-solsparc-apr_27
*************************************************************************
Work Around
The best work around is for the serializable class to use writeObject/readObject instead of writeUTF/readUTF.  In JDK 1.3.1, writeUTF and writeObject with a java.lang.String both map to writing a CORBA wstring.  JDK 1.3 also did this, and thus if you use writeObject, you'll have full interoperability with Kestrel.

Another work around is to use default serialization rather than custom marshaling.
Evaluation
We're currently planning to document this in the release notes for Ladybird, and fix it in Merlin.

J2EE will need to escalate this if they really want it fixed for Ladybird.  I sent a mail out to j2ee-release yesterday.

As of today, it is fixed in rip-int.

 xxxxx@xxxxx  2001-04-04
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang