Hi,
I was previously using RestEasy 3.0.3 (and other releases back a fair way)
deployed in an ear on JBoss 4.2.3.
I would like to upgrade to 3.0.4 (XXE fixes) but on trying this I have run into
problems with the unmarshalling of the XML by JAXB (full stack trace below)
As there is no change to the code itself (only the RestEasy version) and this
is easily repeatable I am wondering what is going wrong.
All other aspects of the REST interface (authentication GETS , not JAXB POSTS,
PUTS, DELETES) are working fine.
I noticed the JAXB version has been updated and now the interface jar is
included.
Could this be clashing with the interface jar in the endorsed libraries folder
of JBoss?
Thanks for any help.
Mark
Example XML request
URL (POST Method)
https://localhost:8443/EWorkbookWebApp/services/1.0/cache/entities/bd9ab8c01fa711e3a7c3b8ac6fa2299f/commit
PAYLOAD
1.
2. <?xml version="1.0" encoding="utf-8"?><commit
xmlns="http://entity.services.ewb.idbs.com"
entityId="bd9ab8c01fa711e3a7c3b8ac6fa2299f" entityVersionType="DRAFT"><author
reason=""/></commit>
EXECEPTION
[java] 10:32:44,326 WARN [ExceptionHandler] Failed executing POST
/services/1.0/cache/entities/bd9ab8c01fa711e3a7c3b8ac6fa2299f/commit
[java] org.jboss.resteasy.plugins.providers.jaxb.JAXBUnmarshalException:
javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"commit").
Expected elements are
<{http://entity.services.ewb.idbs.com}commit>,<{http://entity.services.ewb.idbs.com}data>,<{http://entity.services.ewb.idbs.com}entities>,<{http://entity.services.ewb.idbs.com}entityAttribute>,<{http://entity.services.ewb.idbs.com}entityAttributeSequence>,<{http://entity.services.ewb.idbs.com}entityComment>,<{http://entity.services.ewb.idbs.com}entityCommentSequence>,<{http://entity.services.ewb.idbs.com}entityCreated>,<{http://entity.services.ewb.idbs.com}entityDefinition>,<{http://entity.services.ewb.idbs.com}entityDto>,<{http://entity.services.ewb.idbs.com}entityPathSequences>,<{http://entity.services.ewb.idbs.com}entityRetrieveOptions>,<{http://entity.services.ewb.idbs.com}entitySequence>,<{http://entity.services.ewb.idbs.com}entityTag>,<{http://entity.services.ewb.idbs.com}entityTagSequence>,<{http://entity.services.ewb.idbs.com}entityTypeNames>,<{http://entity.services.ewb.idbs.com}entityUpdate>,<{http://entity.services.ewb.idbs.com}entityValidation>,<{http://entity.services.ewb.idbs.com}entityVersionSequence>,<{http://entity.services.ewb.idbs.com}entityVersions>,<{http://entity.services.ewb.idbs.com}paths>,<{http://entity.services.ewb.idbs.com}placeholderUpdate>,<{http://entity.services.ewb.idbs.com}recordOutline>,<{http://entity.services.ewb.idbs.com}replaceEntityInfo>,<{http://entity.services.ewb.idbs.com}responseStatus>,<{http://entity.services.ewb.idbs.com}signOff>,<{http://entity.services.ewb.idbs.com}templateValidationResponse>,<{http://entity.services.ewb.idbs.com}userActionInfo>
[java] at
org.jboss.resteasy.plugins.providers.jaxb.JAXBXmlTypeProvider.readFrom(JAXBXmlTypeProvider.java:109)
[java] at
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:59)
[java] at
org.jboss.resteasy.core.interception.ServerReaderInterceptorContext.readFrom(ServerReaderInterceptorContext.java:62)
[java] at
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:51)
[java] at
org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59)
[java] at
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53)
[java] at
org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:150)
[java] at
org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:88)
[java] at
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:111)
[java] at
org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280)
[java] at
org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234)
[java] at
org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:221)
[java] at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
[java] at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
[java] at
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
[java] at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
[java] at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
<Snip>
[java] at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
[java] at java.lang.Thread.run(Thread.java:722)
[java] Caused by: javax.xml.bind.UnmarshalException: unexpected element
(uri:"", local:"commit"). Expected elements are
<{http://entity.services.ewb.idbs.com}commit>,<{http://entity.services.ewb.idbs.com}data>,<{http://entity.services.ewb.idbs.com}entities>,<{http://entity.services.ewb.idbs.com}entityAttribute>,<{http://entity.services.ewb.idbs.com}entityAttributeSequence>,<{http://entity.services.ewb.idbs.com}entityComment>,<{http://entity.services.ewb.idbs.com}entityCommentSequence>,<{http://entity.services.ewb.idbs.com}entityCreated>,<{http://entity.services.ewb.idbs.com}entityDefinition>,<{http://entity.services.ewb.idbs.com}entityDto>,<{http://entity.services.ewb.idbs.com}entityPathSequences>,<{http://entity.services.ewb.idbs.com}entityRetrieveOptions>,<{http://entity.services.ewb.idbs.com}entitySequence>,<{http://entity.services.ewb.idbs.com}entityTag>,<{http://entity.services.ewb.idbs.com}entityTagSequence>,<{http://entity.services.ewb.idbs.com}entityTypeNames>,<{http://entity.services.ewb.idbs.com}entityUpdate>,<{http://entity.services.ewb.idbs.com}entityValidation>,<{http://entity.services.ewb.idbs.com}entityVersionSequence>,<{http://entity.services.ewb.idbs.com}entityVersions>,<{http://entity.services.ewb.idbs.com}paths>,<{http://entity.services.ewb.idbs.com}placeholderUpdate>,<{http://entity.services.ewb.idbs.com}recordOutline>,<{http://entity.services.ewb.idbs.com}replaceEntityInfo>,<{http://entity.services.ewb.idbs.com}responseStatus>,<{http://entity.services.ewb.idbs.com}signOff>,<{http://entity.services.ewb.idbs.com}templateValidationResponse>,<{http://entity.services.ewb.idbs.com}userActionInfo>
[java] at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:647)
[java] at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:258)
[java] at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:253)
[java] at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:120)
[java] at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:1052)
[java] at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:483)
[java] at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:464)
[java] at
com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:152)
[java] at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
[java] at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
[java] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
[java] at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown
Source)
[java] at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
<Snip>
[java] at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:119)
[java] at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:102)
[java] at
org.jboss.resteasy.plugins.providers.jaxb.ExternalEntityUnmarshaller.unmarshal(ExternalEntityUnmarshaller.java:158)
[java] at
org.jboss.resteasy.plugins.providers.jaxb.ExternalEntityUnmarshaller.unmarshal(ExternalEntityUnmarshaller.java:134)
[java] at
org.jboss.resteasy.plugins.providers.jaxb.JAXBXmlTypeProvider.readFrom(JAXBXmlTypeProvider.java:95)
[java] ... 33 more
________________________________
The information contained in this email may contain confidential or legally
privileged information. If you are not the intended recipient any disclosure,
copying, distribution or taking any action on the contents of this information
may be unlawful. If you have received this email in error, please delete it
from your system and notify us immediately. Any views expressed in this message
are those of the individual sender, except where the message states otherwise.
IDBS takes no responsibility for any computer virus which might be transferred
by way of this email and recommends that you subject any incoming E-mail to
your own virus checking procedures. We may monitor all E-mail communication
through our networks. If you contact us by E-mail, we may store your name and
address to facilitate communication.
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users