Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » How to use MOXy provider with Glassfish server
How to use MOXy provider with Glassfish server [message #552301] Wed, 11 August 2010 11:54 Go to next message
Eclipse UserFriend
Hi, I would like to use EclipseLink MOXy JAXB provider in my EJB application deployed on the Glassfish server. I downloaded org.eclipse.persistence.moxy.jar into glassfish's modules folder and placed jaxb.properties file with content: javax.xml.bind.context.factory=org.eclipse.persistence.jaxb. JAXBContextFactory into my entities/xmltypes folder. When I deploy my app into Glassfish there is following error in server.log:
Quote:
javax.xml.ws.WebServiceException: Unable to create JAXBContext ... Property "id" has an XmlID annotation but its type is not String.
Because MOXy should support non-String types annotated with @XmlID I presume MOXy was not used by Glassfish. Does anybody know how properly configure Glassfish to work with MOXy? Thank you and sorry my English.
Re: How to use MOXy provider with Glassfish server [message #552543 is a reply to message #552301] Thu, 12 August 2010 11:10 Go to previous messageGo to next message
Eclipse UserFriend
Your setup appears to be correct.

The exception you gave is a JAX-WS exception. GlassFish contains the Metro JAX-WS implementation, unforunately that JAX-WS implementation does not allow alternate JAXB implementations to be plugged in.

To confirm MOXy is configured correctly you could try instantiating a JAXBContext in something like a servlet and outputing the impl class.
Re: How to use MOXy provider with Glassfish server [message #552563 is a reply to message #552301] Thu, 12 August 2010 12:08 Go to previous message
Eclipse UserFriend
Bad news, because for example EclipseLink's AttributeGroup is very nice feature which unfortunately doesn't work with Metro JAXB. Returning a detached entity from JAX-WS service cause exception if the entity contains unfetched attributes. MOXy would solve this problem if I understand well. It is pity I cannot use it.

Thanks a lot for answer.

[Updated on: Thu, 12 August 2010 12:12] by Moderator

Previous Topic:Eclipselink and JBoss 5.1 java.net.MalformedURLException
Next Topic:@Valid and collections
Goto Forum:
  


Current Time: Sat Jul 12 19:41:16 EDT 2025

Powered by FUDForum. Page generated in 0.04734 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top