Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Hibernate deserialization exception

Help
Aaron
2005-08-30
2013-04-25
  • Aaron
    Aaron
    2005-08-30

    I'm trying to use hibernate to persist channels/items.  I am able to successfully save them.  However, when I try to load them I get a deserialization exception.  The specific exception is an EOFException coming from the ObjectInputStream class.  The problem is with the serialized URL objects.  The line of code I'm using is just

    Object o = session.find("from Channel c where c.title='CNN.com'");

    I tweaked the code and hibernate mapping to save the URLs as strings and everything works.

    Did I not set something up correctly?
    I'm also curious why you wouldn't serialize the URLs as strings.