cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-3481) Issue when CXF JAX RS is used in conjunction with Struts
Date Wed, 04 May 2011 12:53:03 GMT

     [ https://issues.apache.org/jira/browse/CXF-3481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Beryozkin resolved CXF-3481.
-----------------------------------

    Resolution: Not A Problem

Making sure Struts 2 dispatcher is not consuming the request input stream resolves this issue

https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Multiparts#JAX-RSMultiparts-NoteaboutStruts

> Issue when CXF JAX RS is used in conjunction with Struts
> --------------------------------------------------------
>
>                 Key: CXF-3481
>                 URL: https://issues.apache.org/jira/browse/CXF-3481
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration, JAX-RS
>    Affects Versions: 2.3.2, 2.3.3
>         Environment: Apache tomcat, Linux, Struts 2.0.11, CXF 2.3.3 / 2.3.2
>            Reporter: Shashank Rachamalla
>              Labels: cxf, jaxrs, multipart/form-data, struts, struts2
>         Attachments: struts_cxf_src.tar.gz, struts_cxf_updated_src.tar.gz
>
>
> Unable to upload a file using multipart/form-data using CXF JAX-RS when struts dispatcher
is enabled.
> java.io.IOException: Couldn't find MIME boundary: -----------------------------152511409213134130561995336006
> 	at org.apache.cxf.attachment.AttachmentDeserializer.initializeRootMessage(AttachmentDeserializer.java:122)
> 	at org.apache.cxf.attachment.AttachmentDeserializer.initializeAttachments(AttachmentDeserializer.java:91)
> 	at org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:64)
> 	... 44 more
> 1 May, 2011 4:13:00 PM org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver
onMessage
> SEVERE: Error occurred during error handling, give up!
> org.apache.cxf.interceptor.Fault: Couldn't find MIME boundary: -----------------------------152511409213134130561995336006
> 	at org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:66)
> 	at org.apache.cxf.jaxrs.ext.MessageContextImpl.createAttachments(MessageContextImpl.java:226)
> 	at org.apache.cxf.jaxrs.ext.MessageContextImpl.get(MessageContextImpl.java:70)
> 	at org.apache.cxf.jaxrs.impl.tl.ThreadLocalMessageContext.get(ThreadLocalMessageContext.java:38)
> 	at org.apache.cxf.jaxrs.utils.multipart.AttachmentUtils.getAttachments(AttachmentUtils.java:71)
> 	at tutorial.RestService.saveForm(RestService.java:24)
> 	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:616)
> 	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
> 	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
> 	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:153)
> 	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:87)
> 	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> 	at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
> 	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)
> 	at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:97)
> 	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461)
> 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:149)
> 	at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:148)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> 	at java.lang.Thread.run(Thread.java:636)
> Caused by: java.io.IOException: Couldn't find MIME boundary: -----------------------------152511409213134130561995336006
> 	at org.apache.cxf.attachment.AttachmentDeserializer.initializeRootMessage(AttachmentDeserializer.java:122)
> 	at org.apache.cxf.attachment.AttachmentDeserializer.initializeAttachments(AttachmentDeserializer.java:91)
> 	at org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:64)
> sample web.xml configuration to reproduce the issue:
>  
>     <filter>
>         <filter-name>struts2</filter-name>
>         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>     </filter>
>     <filter-mapping>
>         <filter-name>struts2</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <servlet>
> 	<servlet-name>CXFServlet</servlet-name>
> 	<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
> 	<load-on-startup>1</load-on-startup>
>     </servlet>
>     <servlet-mapping>
> 	<servlet-name>CXFServlet</servlet-name>
> 	<url-pattern>/rest/*</url-pattern>
>     </servlet-mapping>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message