users@jersey.java.net

[Jersey] JAXB marshalling creates duplicate elements

From: sarat.pediredla <sarat.pediredla_at_gmail.com>
Date: Thu, 2 Dec 2010 06:25:06 -0800 (PST)

I am posting it on the off-chance that somebody else might have some insight
into it. We are using Jersey with Hibernate entities to output XML and JSON.

Until quite recently, everything was fine and the XML/JSON produced was
perfect. However, due to some unknown reason, all the XML/JSON produced now
duplicates the "id" element twice.

I have made sure that,

1. Nothing has changed in the marshalling code. By default, we just use the
Jersey supplied JAXB marshaller.
2. Jersey version is 1.0 (same as before).
3. Checked the @XmlElement, @XmlAccessorType and @XmlType configurations on
the object to ensure nothing has changed. Also, I am pretty sure that JAXB
annotations would throw an error if I have duplicate elements in config.

Can anyone think of a reason why an element would be output twice?
-- 
View this message in context: http://jersey.576304.n2.nabble.com/JAXB-marshalling-creates-duplicate-elements-tp5796159p5796159.html
Sent from the Jersey mailing list archive at Nabble.com.