Estoy llamando a este método remoto:
RespuestaError<Co> cox(String a, String b, String c, int d) throws RemoteException;
Estoy recibiendo este error
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: jtwitter.base.RespuestaError
Está diciendo que RespuestaError no es serializable pero es:
public class RespuestaError<T extends Serializable> implements Serializable {
private static final long serialVersionUID = 8483079015565009698L;
private T returned;
private Error error;
public RespuestaError(T returned, Error error)
{
//...
}
//...
}
Dónde Error
es una enumeración En este caso particular T
es:
public class Co implements Serializable {
private static final long serialVersionUID = 2759254657635643074L;
private String a;
private int b;
private Us c;
public Co(String a, int b, Us c)
{
//...
}
//...
}
Y la clase de nosotros es:
public class Us implements Serializable {
private static final long serialVersionUID = -6725570673833522155L;
private int a;
private String b;
private String c;
private String d;
private String e;
private int f;
public Us(int a, String b, String c, String d, String e, int f)
{
//...
}
//...
}
Everithing extiende Serializable No veo el error.
Respuestas
0 para la respuesta № 1No hay error en el código. El problema es que no estoy ejecutando el código que estoy pensando que estoy ejecutando. Limpiar y volver a compilar todos los archivos resuelve este problema.