4 Replies Latest reply on Jun 14, 2012 12:48 PM by Shambhu Chate

    InvalidClassException in jboss7 with trove

    Shambhu Chate Newbie

      Hi,

       

      we are upgrading to jboss7 and facing an issue with trove.jar. we use trove 2.0.4 jar in our app and when we try to load TIntArrayList we get the following exception.

       

      We write a serialized object to file and when reading get this exception. On writing its observed that TIntArrayList is loaded by null (system) classloader. What should we do to fix the issue?

       

      8:06:15,192 ERROR [stderr] (Thread-300) java.io.InvalidClassException: gnu.trove.TIntArrayList; local class incompatible: stream classdesc serialVersionUID = -8009749324757823162, local class serialVersionUI

      D = 1

      08:06:15,193 ERROR [stderr] (Thread-300) at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)

      08:06:15,193 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)

      08:06:15,194 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)

      08:06:15,194 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)

      08:06:15,194 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

      08:06:15,195 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

      08:06:15,197 ERROR [stderr] (Thread-300) at java.util.ArrayList.readObject(ArrayList.java:593)

      08:06:15,198 ERROR [stderr] (Thread-300) at sun.reflect.GeneratedMethodAccessor118.invoke(Unknown Source)

      08:06:15,199 ERROR [stderr] (Thread-300) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      08:06:15,201 ERROR [stderr] (Thread-300) at java.lang.reflect.Method.invoke(Method.java:597)

      08:06:15,202 ERROR [stderr] (Thread-300) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)

      08:06:15,203 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)

      08:06:15,205 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)

      08:06:15,206 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)

      08:06:15,208 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)

      08:06:15,209 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)

      08:06:15,210 ERROR [stderr] (Thread-300) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

       

      Thanks