net.sf.hibernate.type.SerializationException: could not deserialize

Hibernate JIRA | Vivek Venugopalan | 1 decade ago
  1. 0

    I recently downloaded Hybernate 2.1.1 and tried to run the examples which ran fine. Then executed the junits to verify if things worked fine. The test Class org.hibernate.test.FooBarTest.testPersistCollections failed with the following error. could not deserialize net.sf.hibernate.type.SerializationException: could not deserialize at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:194) at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:220) at org.hibernate.test.FooBarTest.testPersistCollections(FooBarTest.java:2262) at org.hibernate.test.TestCase.runTest(TestCase.java:80) Caused by: java.lang.ClassNotFoundException: long at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:195) at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:654) at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at java.io.ObjectInputStream.inputArray(ObjectInputStream.java:1142) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:374) at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at java.util.HashMap.readObject(HashMap.java:840) at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519) at net.sf.hibernate.impl.SessionImpl.readObject(SessionImpl.java:446) at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:190) ... 14 more

    Hibernate JIRA | 1 decade ago | Vivek Venugopalan
    net.sf.hibernate.type.SerializationException: could not deserialize
  2. 0

    I recently downloaded Hybernate 2.1.1 and tried to run the examples which ran fine. Then executed the junits to verify if things worked fine. The test Class org.hibernate.test.FooBarTest.testPersistCollections failed with the following error. could not deserialize net.sf.hibernate.type.SerializationException: could not deserialize at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:194) at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:220) at org.hibernate.test.FooBarTest.testPersistCollections(FooBarTest.java:2262) at org.hibernate.test.TestCase.runTest(TestCase.java:80) Caused by: java.lang.ClassNotFoundException: long at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:255) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:195) at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:654) at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at java.io.ObjectInputStream.inputArray(ObjectInputStream.java:1142) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:374) at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at java.util.HashMap.readObject(HashMap.java:840) at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519) at net.sf.hibernate.impl.SessionImpl.readObject(SessionImpl.java:446) at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:190) ... 14 more

    Hibernate JIRA | 1 decade ago | Vivek Venugopalan
    net.sf.hibernate.type.SerializationException: could not deserialize
  3. 0

    Hibernate Community • View topic - junit fails with mysql

    hibernate.org | 8 months ago
    net.sf.hibernate.type.SerializationException: could not deserialize
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error class not found when readObject from InputStream

    Stack Overflow | 2 years ago | scarework
    java.lang.ClassNotFoundException: com.alu.vital.vq.jasper.aggregation.AJPercentileAggregator
  6. 0

    javax.ejb.Handle DeSerialize Problem

    Google Groups | 2 decades ago | Shuichi Asai
    java.lang.ClassNotFoundException: jp.co.tenartni.esb.xsv._BasicSessionESB_Stub

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassNotFoundException

      long

      at java.net.URLClassLoader$1.run()
    2. Java RT
      ObjectInputStream.defaultReadObject
      1. java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      2. java.security.AccessController.doPrivileged(Native Method)
      3. java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      4. java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      5. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
      6. java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      7. java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
      8. java.lang.Class.forName0(Native Method)
      9. java.lang.Class.forName(Class.java:195)
      10. java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:654)
      11. java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
      12. java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
      13. java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
      14. java.io.ObjectInputStream.inputArray(ObjectInputStream.java:1142)
      15. java.io.ObjectInputStream.readObject(ObjectInputStream.java:374)
      16. java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
      17. java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
      18. java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412)
      19. java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
      20. java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
      21. java.util.HashMap.readObject(HashMap.java:840)
      22. java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
      23. java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
      24. java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
      25. java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
      26. java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
      26 frames
    3. net.sf.hibernate
      SessionImpl.readObject
      1. net.sf.hibernate.impl.SessionImpl.readObject(SessionImpl.java:446)
      1 frame
    4. Java RT
      ObjectInputStream.readObject
      1. java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
      2. java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
      3. java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
      4. java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
      4 frames
    5. net.sf.hibernate
      SerializationHelper.deserialize
      1. net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:190)
      2. net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:194)
      3. net.sf.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:220)
      3 frames
    6. org.hibernate.test
      TestCase.runTest
      1. org.hibernate.test.FooBarTest.testPersistCollections(FooBarTest.java:2262)
      2. org.hibernate.test.TestCase.runTest(TestCase.java:80)
      2 frames