[jboss-user] [JBoss Seam] - could not deserialize

toni do-not-reply at jboss.com
Thu Apr 5 03:39:47 EDT 2007


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;
  }
}


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034893#4034893

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034893



More information about the jboss-user mailing list