Hello Diego, the common classes between the server and client parts (such as the classes for the bean objects that are serialized/deserialized) must be located in the same packages. The reason is that the serialization/deserialization process leverages conventions, in particular convention regarding the full path of the bean classes are referenced inside the JSON representation. All other classes such as ClientResource, annotated interfaces could be located in distinct packages between client/server projects.
Best regards, Thierry Boileau After trying many many many many things I made it work. I asked in the > Restlet Mailing list too, and I will comment this same thing there. > > In the try/catch block I put this: > > > Log.w("json > get(MediaType)",cr.get(MediaType.APPLICATION_JSON).toString()); > ObjectRepresentation<DBUser> r = new > ObjectRepresentation<DBUser>(cr.get()); > Log.w("get user",r.getObject().toString()); > > And all I got was a ClassNotFoundException because my Android device said > it couldn't find the "com.server.common.MyUser" class, I renamed both > server and clients packages to the same name and it worked. > > Is it necessary that the packages are the same too? > > ------------------------------------------------------ > > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3011494 > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3011814