0 Replies Latest reply on Apr 17, 2007 6:20 AM by Toni Beckman

    could not deserialize

    Toni Beckman Novice

      Hi,

      I have an entity bean, which references an exception. Persiting the entity bean to the postgresql 7.4 works without problems.

      However, I can't read/restore them, because I get the following exception:

      org.hibernate.type.SerializationException: could not deserialize

      Does anybody know how to avoid this? I think the code and annotations are fine. Here is the entity bean in question:

      @Entity
      @Name("systemMessage")
      
      public class SystemMessage implements Serializable
      {
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      long id;
      
      @Lob
      String message;
      
      @Temporal(TemporalType.TIMESTAMP)
      Date creationDate = new Date(System.currentTimeMillis());
      
      @Enumerated
      SystemMessageType systemMessageType = SystemMessageType.INFO;
      
      @Lob
      Throwable throwable;
      
      public SystemMessage()
      {
      super();
      }
      
      public SystemMessage(String message, SystemMessageType systemMessageType, Throwable throwable)
      {
      this.message = message;
      this.systemMessageType = systemMessageType;
      this.throwable = throwable;
      }
      
      public long getId()
      {
      return id;
      }
      
      public void setId(long id)
      {
      this.id = id;
      }
      
      public String getMessage()
      {
      return message;
      }
      
      public void setMessage(String message)
      {
      this.message = message;
      }
      
      public Date getCreationDate()
      {
      return creationDate;
      }
      
      public void setCreationDate(Date creationDate)
      {
      this.creationDate = creationDate;
      }
      
      public SystemMessageType getSystemMessageType()
      {
      return systemMessageType;
      }
      
      public void setSystemMessageType(SystemMessageType systemMessageType)
      {
      this.systemMessageType = systemMessageType;
      }
      
      public Throwable getThrowable()
      {
      return throwable;
      }
      
      public void setThrowable(Throwable throwable)
      {
      this.throwable = throwable;
      }
      }