camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <>
Subject Issue with rest-dsl and improper marshalling
Date Tue, 09 Feb 2016 19:45:44 GMT
I'm using the rest-dsl in Camel 2.16.2. On each rest route, I use
consumes("application/json") and produces("application/json"). I am using
RestBindingMode.json. However, I have gotten some strange HTTP responses
when I use a non-2xx status code. For instance, I have an error message
POJO that corresponds to the JSON data for our error response. I'll set the
message body to this object. This object is Serializable and sent over
ActiveMQ. The response I'm getting is not JSON data and in fact looks
strangely like the toString() output of this class.

I've had a similar problem where a class we're using has both JAXB and
Jackson annotations on it and in a case where the status code was set to
500 (caused by an exception thrown during a multicast) and the response was
marshalled as XML instead of JSON.

I'd like to know if this is a known issue or something that was already
fixed in master before I try to make a minimal reproduction of the bug. Or
maybe I'm doing something wrong?

Matt Sicker <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message