Please open JAXB2 source as soon as possible
Although JAXB2 is declared as very usable, but steal much bugs.
eg, the @XmlElementWrapper/@XmlElements binding not works in the current binary boundle.
also, if you declare a java.sql.Date field and try to marshal the instance, then a CCE throws and no useful message at all.
also, if u declare a field with @XmlAttribute(required=true), then in the marshal output, you will find something like:
, it means the attribute's name is used with ##default not the field name.
I think all this things is easy to solved, and open source is the way to speed up the process. More people can look at the source, writing test case for it, and improve it to be stable.