Java serialization problem

Posted by stefan89 on Stack Overflow See other posts from Stack Overflow or by stefan89
Published on 2010-04-22T21:19:32Z Indexed on 2010/04/22 21:53 UTC
Read the original article Hit count: 180

Filed under:
|

I have two classes X and Y, like this:

class X implements Serializable
{
  int val1;
  Y val2;
}

class Y implements Serializable
{
  int val;
}

I want to transmit an object of type X from a client to server but i can't because the class X has a field of type Y. I replaced the field of type Y with a field of type X in class X and it works.

© Stack Overflow or respective owner

Related posts about java

Related posts about serialization