RMI and JDK versions: Interoperability

Discussion in 'Java' started by varlagas@yahoo.com, Jul 25, 2005.

  1. Guest

    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.
    , Jul 25, 2005
    #1
    1. Advertising

  2. Guest

    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.

    wrote:
    > 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.
    , Jul 25, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sascha Moellering
    Replies:
    2
    Views:
    2,846
    Sudsy
    Aug 11, 2004
  2. Ulf Meinhardt
    Replies:
    0
    Views:
    6,414
    Ulf Meinhardt
    Aug 10, 2006
  3. Jaggu
    Replies:
    3
    Views:
    984
    Nigel Wade
    Jan 8, 2007
  4. Holmbrew
    Replies:
    2
    Views:
    1,443
    Arne Vajhøj
    Mar 24, 2009
  5. Roedy Green
    Replies:
    3
    Views:
    2,371
    Arne Vajhøj
    Aug 6, 2009
Loading...

Share This Page