Serialize and Deserialize

Serialize and Deserialize with Oracle 9 and Oracle 10

We have developed a client/server application. Client is a Java application and Server is written in C-Language; link between Java and C is RPC/JRPC.

We have to serialize and then deserialize a stream in a clob field in Oracle DB. When we deserialize with Oracle 9 we have no problem; now, after a migration to Oracle 10G, the deserialize failed at client level.

If we test in test environment (Oracle 9) with the same client and the same server we have no problem. The only difference between two enviroenment is only the version of Oracle (9 is OK - 10G is KO).

We use the OCI api.

The error message at client level is:

java.io.InvalidClassException: rpc.wDichiarazione; local class incompatible: stream classdesc serialVersionUID = 2960125282182152041, local class serialVersionUID = 2960125281578161001

Thanks of all

Marco

[935 byte] By [giovinazzoa] at [2007-11-27 8:43:15]
# 1

You've changed a class definition. It has nothing to do with the Oracle version. Recompile that class with

private static long serialVersionUID = 2960125282182152041;

If you then get another exception, you need to evaluate the changes you've made to the class in the light of what it says about Versioning in the Serialization specification.

ejpa at 2007-7-12 20:42:51 > top of Java-index,Core,Core APIs...