1 Reply Latest reply on Jan 13, 2007 7:17 AM by Jorge Fernandes

    java.io.InvalidClassException: org.hibernate.collection.Pers

    Jorge Fernandes Newbie

      I have this problem in my aplication when I try to generate a List from my database.

      Caused by: java.io.InvalidClassException: org.hibernate.collection.PersistentSet
      ; local class incompatible: stream classdesc serialVersionUID = 3994781329260376
      240, local class serialVersionUID = 7442467225843903080
      at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:155
      1)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1465)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
      698)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:19
      17)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1841)

      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
      718)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
      at org.hibernate.util.SerializationHelper.deserialize(SerializationHelpe
      r.java:210)

      but, when this code

      public static void main(String[] args) {
      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
      try {
      Class srp = tcl.loadClass("org.hibernate.collection.PersistentSet");
      System.out.println(srp.getProtectionDomain().getCodeSource());
      ObjectStreamClass osc = ObjectStreamClass.lookup(srp);
      System.out.println("getSerialVersionUID: "+osc.getSerialVersionUID());
      } catch (ClassNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      }

      I have this answer in my console

      (file:/C:/Arquivos%20de%20programas/jboss-4.0.4.GA/server/default/lib/hibernate3.jar <no signer certificates>)
      getSerialVersionUID: 7442467225843903080

      I don´t have any trouble with teh same .ear in other jboss

      Someone can Help?
      thanKs