开发者

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

开发者 https://www.devze.com 2023-03-08 13:11 出处:网络
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.

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 g开发者_StackOverflow中文版et:

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.


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:

  • http://www.eclipse.org/eclipselink/downloads/nightly.php

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.

  • https://bugs.eclipse.org/347466

For More Information on Binder

  • http://bdoughan.blogspot.com/2010/09/jaxb-xml-infoset-preservation.html
0

精彩评论

暂无评论...
验证码 换一张
取 消