0

I have A class, which contains a list List. Both implements Serialization. The list type is final. I'm using both tpye in a GWT Project. A and B have to be serialized because of RTC communication.

But this isn't working. I got a message that final type can't be serialized. But if I delet the final word, the program isnt working.

(I'm using hybernate also in my project)

class A implements Serializable {
    public String s1;
    public final List<B> list = new ArrayList<B>();
}


class B implements Serializable {
    public String s;
    public int s;
}
Kroy
  • 299
  • 1
  • 5
  • 18
  • You probably don't have a no argument constructor. Classes that are used for RPC communication must contain one. So just add `public A(){}` and `public B(){}` constructors with no arguments. – Darek Kay Oct 04 '14 at 13:35
  • Tried it. Doesnt work :( It's the same with constructors than without constructors – Kroy Oct 04 '14 at 17:55

0 Answers0