Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 15:54 Go to next message
Stan Svec is currently offline Stan SvecFriend
Messages: 6
Registered: January 2010
Junior Member
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 15:10 Go to previous messageGo to next message
Blaise Doughan is currently offline Blaise DoughanFriend
Messages: 163
Registered: July 2009
Senior Member

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 16:08 Go to previous message
Stan Svec is currently offline Stan SvecFriend
Messages: 6
Registered: January 2010
Junior Member
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 16:12]

Report message to a moderator

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


Current Time: Tue Mar 19 04:02:21 GMT 2024

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

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

Back to the top