Search code examples
xmljaxbjava-metro-frameworkjaxb2moxy

Can I use the JAXB2 Basics plugin with the MOXy JAXB implementation from EclipseLink? If not, is there an alternate?


Ultimately I want JAXB to generate hashCode and equals implementations. The JAXB2 Basics plugin does that and it works fine for the Metro JAXB implementation in the JDK but fails with MOXy.

I get:

java.lang.IllegalArgumentException at org.eclipse.persistence.jaxb.JAXBBinder.updateXML(JAXBBinder.java:131) at org.eclipse.persistence.jaxb.JAXBBinder.updateXML(JAXBBinder.java:126)

MOXy works fine for me otherwise, i.e. if I get rid of the equals and hashCode generating code, everything is good.


Solution

  • UPDATE

    We have submitted a fix for this issue into our EclipseLink 2.3.0 stream. You will be able to obtain a nightly download from the link below starting May 28, 2011:


    The issue you are seeing is due to a bug in the EclipseLink JAXB (MOXy) implementation of Binder. We are currently working on a fix.

    For More Information on Binder