Bug: Java Version Mismatch? Mark S. Miller (markm@caplet.com)
Tue, 15 Feb 2000 13:00:47 -0800

When I try to establish a connection between an E running on a Sun Java 1.1.8 and a Sun Java 1.2.2, I get the following exception. Bill especially, any ideas? Might Sun have made an incompatible change in serialization formats or something?

If both are running the same version of Java, no such problem appears, even when one is running on Windows and the other on Linux. But the problem appears when they're communicating between these Java versions, no matter which platform each is running on. This exception was reported by a 1.1.8 trying to connect to the 1.2.2. system. For some reason, the only matching source file I've got is from the jdk1.3Beta. Near line 100, it has a DSAPublicKey.getParams() with several casts. I include it below as well. Unfortunately, because of a previously reported bug, I can't connect at all on the 1.3Beta, and therefore I can't reproduce the bug under a debugger with sources.

This bug is very important, but not urgent.

Workaround for the moment: Use the same version of Java under all the Es that should be able to talk to each other.

java.io.IOException: java.lang.ClassCastException: sun.security.x509.AlgorithmId

     at sun.security.provider.DSAPublicKey.getParams(DSAPublicKey.java:100)
     at sun.security.provider.DSA.engineInitVerify(DSA.java:118)
     at java.security.Signature.initVerify(Signature.java:221)
     at org.erights.e.net.data.StartUpProtocol.isSigGood(StartUpProtocol.java:967)
     at org.erights.e.net.data.StartUpProtocol.isSecondDHOK(StartUpProtocol.java:905)
     at org.erights.e.net.data.StartUpProtocol.handleStateOutgoingExpectGOTOO(StartUpProtocol.java:675)
     at org.erights.e.net.data.StartUpProtocol.processMessage(StartUpProtocol.java:1089)
     at org.erights.e.net.data.DataPath.newIncomingMsg(DataPath.java:655)
     at org.erights.e.net.data.DataCommThunk.run(DataCommThunk.java:193)
     at org.erights.e.elib.prim.Runner.now(Runner.java:242)
     at org.erights.e.net.data.RecvThread.callDataPath(RecvThread.java:122)
     at org.erights.e.net.data.RecvThread.readAndProcessMessage(RecvThread.java:484)
     at org.erights.e.net.data.RecvThread.run(RecvThread.java:502)

     at org.erights.e.net.data.DataConnection.tryNextAddress(DataConnection.java:1139)
     at org.erights.e.net.data.DataConnection.shutDownFinished(DataConnection.java:926)
     at org.erights.e.net.data.DataPath.shutDownFinished(DataPath.java:883)
     at org.erights.e.net.data.DataCommThunk.run(DataCommThunk.java:186)
     at org.erights.e.elib.prim.Runner.now(Runner.java:242)
     at org.erights.e.net.data.SendThread.callDataPath(SendThread.java:286)
     at org.erights.e.net.data.SendThread.run(SendThread.java:544)


* Returns the DSA parameters associated with this key, or null if the
* parameters could not be parsed.
*/ public DSAParams getParams() { try { if (algid instanceof DSAParams) { return (DSAParams)algid; } else { DSAParameterSpec paramSpec; AlgorithmParameters algParams = algid.getParameters(); if (algParams == null) { return null; } paramSpec = (DSAParameterSpec)algParams.getParameterSpec (DSAParameterSpec.class); return (DSAParams)paramSpec; } } catch (InvalidParameterSpecException e) { return null; } } Cheers, --MarkM