-
1. Re: Problem to serialize empty object [Jackson]
dward Apr 1, 2013 4:54 PM (in response to tnferreira)When you say "you could change it", do you mean you can, or you can't? There is a jackson flag to change this, but by default it is looking for getter/setter pairs, which this generated java file does not have.
Aside, are you leveraging switchyard clustering in your application? If so, this could bite you there, too...
-
2. Re: Problem to serialize empty object [Jackson]
tnferreira Apr 2, 2013 9:18 AM (in response to dward)Sorry. I couldn't change it. My app will be deployed at one jboss.
How and where do I change this flag ?
Could I register my jackson modules with my custom deserialization logic (registerModule) ? I think it's better to write my custom.
-
3. Re: Problem to serialize empty object [Jackson]
dward Apr 2, 2013 10:35 AM (in response to tnferreira)The way this flag is set is on the Jackon ObjectMapper:
org.codehaus.jackson.map.ObjectMapper objectMapper = (however it's created or retrieved)
objectMapper.disable(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS);
However, using resteasy, I'm not sure where this is done. I have consulted with the developer of our resteasy SwitchYard component, so let's see what he says.
-
4. Re: Problem to serialize empty object [Jackson]
mageshbk Apr 2, 2013 10:32 AM (in response to tnferreira)Hi Thiago,
This error is thrown because the FacilityStatus constructor is protected. Can't this be made public? If not, then we need to use a custom Contextresolver.
regards,
Magesh