users@glassfish.java.net

JAX-RS project migrated to GF4 not marshaling nested objects to JSON

From: Venu Narla <venunarla_at_me.com>
Date: Thu, 27 Jun 2013 16:07:44 -0400

I have a JAX-RS project developed in NetBeans works perfect in Glassfish Server 3.x perfectly .But when migrated to Glassfish server 4.0, nested Objects that are marshalled to JSON are not working correctly. The payload is another object that should have been marshalled into JSON but instead translates to a "java pointer representation". I am sure I am missing a configuration or something related to Jersey 2.0 or some GF 4 setting. Any help will be greatly appreciated!

Example:
{
    code = 200;
    message = "Operation Succeeded";
    payload = "com.dcloud.rest.transfer.LoginResponseTO_at_788391df";
    status = OK;
}