4 Replies Latest reply on Apr 2, 2013 10:32 AM by Magesh Bojan

    Problem to serialize empty object [Jackson]

    tnferreira Newbie

      I want to create a service that retrieve some objects from DDS and expose as a REST web service (json). My model classes was generated by DDS tool (.idl) and I could change it.

       

      But I'm getting this error. How could I change this configuration on Switchyard ?

       

      org.codehaus.jackson.map.JsonMappingException: No serializer found for class br.com.dds.generated.FacilityStatus and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.ArrayList[0]->br.com..dds.generated.Installation["status"])

       

      public class FacilityStatus  {

       

          public static final int _ACTIVE = 0;

          public static final br.com.dds.generated.FacilityStatus ACTIVE = new br.com.dds.generated.FacilityStatus(_ACTIVE);

       

          public static final int _INACTIVE = 1;

          public static final br.com.dds.generated.FacilityStatus INACTIVE = new br.com.dds.generated.FacilityStatus(_INACTIVE);

       

       

          public int value ()

          {

              return __value;

          }

          public static br.com.dds.generated.FacilityStatus from_int (int value)

          {

              if (value >= 0 && value < __size) {

                  return __array[value];

              } else {

                  throw Utilities.createException(Utilities.EXCEPTION_TYPE_BAD_OPERATION, null);

              }

          }

          protected FacilityStatus (int value)

          {

              __value = value;

              __array[__value] = this;

          }

      }