开发者

java.io.InvalidClassException: oracle.jdbc.rowset.OracleCachedRowSet

I hava java swing project which is developed in JBuilder IDE. Now I need to transfer the project in to NetBeans. But when I do that following exception is thrown.

java.io.InvalidClassException: oracle.jdbc.rowset.OracleCachedRowSet; local class incompatible: stream classdesc serialVersionUID = 1184591038813385495, local class serialVersionUID = -6778266293933460977
        at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

This is where the exception occurs

FileInputStream fileInputStream = new FileInputStream(filename);
      ObjectI开发者_如何学CnputStream istream       = new  ObjectInputStream(fileInputStream);

      try{

        crset = (OracleCachedRowSet) istream.readObject();
}

But if works fine in the Jbuilder. I used following jars for the project

ocrs12.zip
ojdbc14.jar.zip
ORADriver.jar
classes12.jar
commons-collections-3.2.jar
commons-pool-1.5.2.jar
jcommon-1.0.8.jar
jfreechart-1.0.4.jar
xerces.jar

Can some one help me to resolve this problem?


The error is thrown when you try to deserialize an object with a different version of the class than it was serialized with (ie you have different versions of the oracle driver loaded).

Any idea why an OracleCachedRowSet is being serialized (and where)? That doesn't seem desirable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜