You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2013/12/03 18:40:36 UTC
[jira] [Resolved] (CXF-5433) JAX-RS method invocation failes in
case @Mutipart(required=false) is used on primitives
[ https://issues.apache.org/jira/browse/CXF-5433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-5433.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.7.9
2.6.12
3.0.0-milestone2
Assignee: Sergey Beryozkin
> JAX-RS method invocation failes in case @Mutipart(required=false) is used on primitives
> ---------------------------------------------------------------------------------------
>
> Key: CXF-5433
> URL: https://issues.apache.org/jira/browse/CXF-5433
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.7.6
> Reporter: Valentin Mayamsin
> Assignee: Sergey Beryozkin
> Fix For: 3.0.0-milestone2, 2.6.12, 2.7.9
>
>
> Here is a sample resource:
> {code}
> @Path("res")
> interface SomeResource {
> @PUT
> @Consumes(MediaType.MULTIPART_FORM_DATA)
> void uploadFile(@Multipart("bin") byte[] fileBytes,
> @Multipart(value = "timestamp", type = "text/plain") long timestamp);
> }
> {code}
> An attempt to upload a file without specifying 'timestamp' part ends up with an exception:
> {code}
> java.lang.IllegalArgumentException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
> at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
> at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
> at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
> at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:355)
> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:319)
> at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1040)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:976)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> at org.eclipse.jetty.server.Server.handle(Server.java:363)
> at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
> at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:931)
> at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:992)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)
> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
> at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
> at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Thread.java:722)
> {code}
--
This message was sent by Atlassian JIRA
(v6.1#6144)