[
https://issues.jboss.org/browse/WFLY-10230?page=com.atlassian.jira.plugin...
]
Marek Marusic resolved WFLY-10230.
----------------------------------
Resolution: Cannot Reproduce
I am closing this issue since we can't reproduce this and we have no further answers
from the reporter. Feel free to reopen this if you have more info how to reproduce this.
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
Priority: Major
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.12.1#712002)