0

I just create the most simple Singleton EJB to return a custom serializable object, but I'm getting the following exception when I invoke the remote method:

org.jboss.serial.exception.SerializationException: Could not create instance of model.Usuario - model.Usuario

It works fine with simple types and normal classes (String for example) but not for an object pertaining to a class I created.

I'm using JBoss 6.0 and Eclipse.

What could I be missing?

Thanks in advance, Saul

4

2 回答 2

2

1.你应该让你的对象实现Serializable

2.将所有不可序列化的字段标记为transient

于 2010-12-08T18:55:57.240 回答
2

您尝试序列化的类必须实现Serializable标记接口或扩展实现它的类。此外,您班级的每个非瞬态成员也必须是Serializable.

于 2010-12-08T19:01:22.483 回答