RMI and JDK versions: Interoperability

V

varlagas

Esmond Pitt, in his java.rmi book, mentions that "it is perfectly
possible to deploy systems where servers use a different version of the
JDK from clients".

Since the book is a 2001 one (no newer books on RMI exist), it
discusses JDK 1.3. Indeed, I have tested interoperability of a 1.2.2
client with a 1.3.1 server in two different environment and it works
just fine.

However, with a 1.4.2 server I get the following exception:

java.rmi.UnmarshalException: error unmarshalling return; nested
exception is:
java.lang.ClassNotFoundException: sun.util.calendar.ZoneInfo
java.lang.ClassNotFoundException: sun.util.calendar.ZoneInfo
at java.lang.Throwable.<init>(Throwable.java:96)
at java.lang.Exception.<init>(Exception.java:44)
at
java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:7
1)
at
java.io_ObjectInputStream.inputObject(ObjectInputStream.java:1200)
at
java.io_ObjectInputStream.readObject(ObjectInputStream.java:479)
at
java.io_ObjectInputStream.readObject(ObjectInputStream.java:234)
at
sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:304)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:96)
at
npmt.cli.common.base.NVNovaCommonDataImpl_Stub.getServerTimezone(NVNo
vaCommonDataImpl_Stub.java:157)
at
npmt.cli.common.base.NovaCommonData.getTheTimezone(NovaCommonData.jav
a:639)
at
npmt.cli.common.NovaLogon.buttonOk_ActionPerformed(NovaLogon.java:76)

Could you please advise whether it is possible to have a 1.2.2 client /
1.4.2 server configuration?

Many thanks in advance!

Panagiotis Varlagas.
 
V

varlagas

Answering my own question: See
http://www-1.ibm.com/support/docview.wss?uid=swg24006847. The problem
is that, in 1.4.2, asking the TimeZone class for the singleton default
time zone returns to you a class (sun.util.calendar.ZoneInfo) new in
JDK 1.4, rather than java.util.SimpleTimeZone, which it did in 1.3.1
(and 1.2.2). Hence, if you wish to have a scenario whereby the client
is at the 1.3.1 (or 1.2.2) version and the server at the 1.4.2 one,
then, you really can't - they don't interoperate. (There are ways to
work around this however, such as creating classes such as XxxTimeZone
and XxxTimeZoneData, them being adaptations of the 1.3.1- TimeZone and
TimeZoneData respectively. Then, use the XxxTimeZone on the server-side
rather than the 1.4.2-provided TimeZone class, in order to create the
"good ol'" (or "bad ol'" for that matter) SimpleTimeZone object that
your client likes.

Panagiotis.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top