Hopefully an easy one for JAXB experts:
I am trying to marshal an immutable class that does not define a default no-arg constructor. I have defined an
I know that this is not the case, but if you have such an error when you put @XmlJavaTypeAdapter for the field - check that you specified the namespace. You may need it.
In my case this didn't work:
@XmlElement(name = "Expiration")
@XmlJavaTypeAdapter(DateAdapter.class)
private Date expiration;
until a namespace has been specified:
@XmlElement(name = "Expiration", namespace="http://site/your.namespace")
@XmlJavaTypeAdapter(DateAdapter.class)
private Date expiration;