Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-11592

fileUpload component incompatible with Apache MyFaces Orchestra conversation scope

    Details

    • Steps to Reproduce:
      Hide

      In an environment with Mojarra 2.1.3, RichFaces 4.1.0-SNAPSHOT, Spring 3.0.4, and Apache MyFaces Orchestra 1.4 set up Orchestra conversation scope (http://myfaces.apache.org/orchestra/myfaces-orchestra-core/installation.html) and create a facelet that uses the rich:fileUpload component. Choose a file to upload and then click Upload and the error occurs.

      Show
      In an environment with Mojarra 2.1.3, RichFaces 4.1.0-SNAPSHOT, Spring 3.0.4, and Apache MyFaces Orchestra 1.4 set up Orchestra conversation scope ( http://myfaces.apache.org/orchestra/myfaces-orchestra-core/installation.html ) and create a facelet that uses the rich:fileUpload component. Choose a file to upload and then click Upload and the error occurs.

      Description

      There is a compatibility issue with recent changes in RichFaces 4.1 Milestone 1 and Apache MyFaces Orchestra conversation scope feature. When including the Orchestra jar in the application the fileUpload component stops working. Orchestra bundles a faces-config.xml that enables 2 FacesContext Factories and multiple PhaseListeners. This did not pose a problem with RichFaces 4.0.0.Final.

      Here is a stacktrace that shows the error:

      Oct 25, 2011 11:45:01 AM org.richfaces.request.MultipartRequest25 parseIfNecessary
      SEVERE: Exception parsing multipart request: Request prolog cannot be read
      org.richfaces.exception.FileUploadException: Exception parsing multipart request: Request prolog cannot be read
                at org.richfaces.request.MultipartRequestParser.parse(MultipartRequestParser.java:156)
                at org.richfaces.request.MultipartRequest25.parseIfNecessary(MultipartRequest25.java:77)
                at org.richfaces.request.MultipartRequest25.getParameter(MultipartRequest25.java:114)
                at com.sun.faces.context.RequestParameterMap.containsKey(RequestParameterMap.java:99)
                at java.util.Collections$UnmodifiableMap.containsKey(Collections.java:1280)
                at org.apache.myfaces.orchestra.frameworkAdapter.jsf.JsfFrameworkAdapter.containsRequestParameterAttribute(JsfFrameworkAdapter.java:105)
                at org.apache.myfaces.orchestra.conversation.ConversationManager.findConversationContextId(ConversationManager.java:169)
                at org.apache.myfaces.orchestra.conversation.ConversationManager.getCurrentRootConversationContext(ConversationManager.java:580)
                at org.apache.myfaces.orchestra.lib.jsf.ContextLockRequestHandler.init(ContextLockRequestHandler.java:87)
                at org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory$1.<init>(OrchestraFacesContextFactory.java:122)
                at org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory.getFacesContext(OrchestraFacesContextFactory.java:103)
                at org.apache.myfaces.orchestra.requestParameterProvider.jsf.RequestParameterFacesContextFactory.getFacesContext(RequestParameterFacesContextFactory.java:93)
                at org.richfaces.context.FileUploadFacesContextFactory.getFacesContext(FileUploadFacesContextFactory.java:136)
                at com.sun.faces.context.InjectionFacesContextFactory.getFacesContext(InjectionFacesContextFactory.java:121)
                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:583)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:446)
                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
                at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
                at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342)
                at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:286)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                at java.lang.Thread.run(Thread.java:619)
      Caused by: java.io.IOException: Request prolog cannot be read
                at org.richfaces.request.MultipartRequestParser.readProlog(MultipartRequestParser.java:270)
                at org.richfaces.request.MultipartRequestParser.initialize(MultipartRequestParser.java:172)
                at org.richfaces.request.MultipartRequestParser.parse(MultipartRequestParser.java:148)
                ... 32 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  joshbrookes Joshua Brookes
                • Votes:
                  5 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: