[
https://issues.jboss.org/browse/WFLY-10230?page=com.atlassian.jira.plugin...
]
Marek Marusic commented on WFLY-10230:
--------------------------------------
I'm not able to reproduce this either on the wildfly 11/12/13. Moreover, I used
different versions of Resteasy with no luck.
[~raytucson] could you please provide more info about this issue please?
What version of the Resteasy do you use?
How do you send the PUT request?
Does the xml contain any special characters?
Thank you in advance.
Premature end of file if PathParam and PUT/POST are used together
-----------------------------------------------------------------
Key: WFLY-10230
URL:
https://issues.jboss.org/browse/WFLY-10230
Project: WildFly
Issue Type: Bug
Components: REST
Affects Versions: 11.0.0.Final
Reporter: Ray Ramos
Assignee: Marek Marusic
The below fails with "Premature End of File". It is a PUT with a PathParam and
a JAXB serializeable entity.
{code:java}
@PUT
@Path("{tenant}")
@Consumes(MediaType.APPLICATION_XML)
public void upsert(@PathParam("tenant") String tenant, DataTransferModel
model)
{code}
{noformat}
2:58:03,715 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (default task-2)
RESTEASY002005: Failed executing PUT /gateway/tenant:
org.jboss.resteasy.plugins.providers.jaxb.JAXBUnmarshalException:
javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; Premature end of file.]
at
org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.readFrom(AbstractJAXBProvider.java:136)
at
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:66)
at
org.jboss.resteasy.core.interception.ServerReaderInterceptorContext.readFrom(ServerReaderInterceptorContext.java:61)
at
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:56)
at
org.jboss.resteasy.security.doseta.DigitalVerificationInterceptor.aroundReadFrom(DigitalVerificationInterceptor.java:36)
at
org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:59)
at
org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:151)
at
org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:92)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:115)
at
org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:406)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:213)
at
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:228)
at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
{noformat}
However, if you remove the PathParam, it works.
{code:java}
@PUT
@Path("tenant")
@Consumes(MediaType.APPLICATION_XML)
public void upsert(DataTransferModel model)
{code}
I tried swapping the order of the parameters and I get a "Stream Closed"
exception instead.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)