9 Replies Latest reply on Oct 31, 2011 11:45 AM by Lukáš Fryč

    RichFaces 4.1.x fileUpload Problems

    Joshua Brookes Newbie

      I have the rich:fileUpload component working in my JSF 2 project with RichFaces 4.0.0-Final, however once I simply upgrade to RichFaces 4.1.x it stops working properly and I see various issues. I need to upgrade so that I can leverage the new pickList component and the maxFilesQuantity attribute on fileUpload.

       

      BOM Version 4.1.0.20110805-M1:

       

      The component renders, but once I select a file to upload and click the Upload button I get the following error in my logs:

      [Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception java.lang.UnsupportedOperationException

       

      It never actually invokes the fileUploadListener that is specified in the tag.

       

      BOM Version 4.1.0-SNAPSHOT (Used today so it is now M3 from 10/18):

       

      The same issue still exists as described above.

       

      In addition, I want to use the new maxFilesQuantity attribute. When I set this value to 1 and test in Internet Explorer, the Clear All button causes the header of the rendered component to disappear so the controls are essentially hidden and you can't do anything with the file. I tested in Chrome and this did not happen.

       

       

      Are there any new settings or is there a modified way in which the fileUpload component is to be used in 4.1.x? If so where is this documented? If not, please address the above issues or help lead me in the right direction.

       

      Thanks,

      Josh

        • 1. Re: RichFaces 4.1.x fileUpload Problems
          Pavol Pitonak Master

          Hi Joshua,

           

          could you please provide more information about your environment - server, JSF version, browser. Maybe code snippet would help to reproduce. I didn't experience no major problems with file upload recently.

           

          Regards,

          Palo

          • 2. Re: RichFaces 4.1.x fileUpload Problems
            Joshua Brookes Newbie

            Sure Palo.

             

            Server: JBoss AS 5.0.1

            JSF Version: Mojarra 2.1.3

            Browser: IE 8

             

            The following is a snippet of the fileUpload code which in this case is used in a composite component:

             

              

             

            {code}
            <
            rich:fileUpload fileUploadListener="#{memosBean.listener}" style="height: 100px;" addLabel="Click to Attach Document" maxFilesQuantity="1"

            acceptedTypes="#{memosBean.fileUploadBean.fileTypesAllowed}" />
            {code}

             

             

            In IE 8 the header part of the component that is rendedered which has the various buttons (Click to Add, Upload, Clear All)

             

            disappears if I choose a file but then click "Clear All". In chrome this does not occur. I tried various scenarios, and what seems to make it break is in IE 8 if you click to add the max number of files that is specified in maxFilesQuantity and then click clear all the header disappears. If my max is 3 and I only click to add 2 then it works fine, but if I click to add 3 then the header disappears.

             

            As for the other issue which is way more propblematic, the component totally fails when I click "Upload" after selecting the files.  This began happening with 4.1.x regardless of the milestone. The only change I made was to the version in my maven pom file.  When debugging I see that the call never gets to the listener method. Here is the stacktrace I see in my server logs:

             

            17:08:07,644 ERROR [][[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
            java.lang.UnsupportedOperationException
            at javax.faces.context.FacesContext.getExceptionHandler(FacesContext.java:280)
            at javax.faces.context.FacesContextWrapper.getExceptionHandler(FacesContextWrapper.java:354)
            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
            at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:366)
            at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
            at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
            at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
            at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
            at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
            at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
            at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
            at org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:89)
            at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
            at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
            at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
            at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:167)
            at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
            at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.compsych.cpp.web.filter.Log4jMDCServletFilter.doFilter(Log4jMDCServletFilter.java:47)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            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:235)
            at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
            at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
            at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            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)
            17:08:07,644 ERROR [][[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
            java.lang.UnsupportedOperationException
            at javax.faces.context.FacesContext.getExceptionHandler(FacesContext.java:280)
            at javax.faces.context.FacesContextWrapper.getExceptionHandler(FacesContextWrapper.java:354)
            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
            at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
            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)
            17:08:07,644 ERROR [][[localhost]] Exception Processing ErrorPage[errorCode=500, location=/resources/errors/fatalException.xhtml]
            java.lang.UnsupportedOperationException
            at javax.faces.context.FacesContext.getExceptionHandler(FacesContext.java:280)
            at javax.faces.context.FacesContextWrapper.getExceptionHandler(FacesContextWrapper.java:354)
            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
            at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
            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)

            • 3. Re: RichFaces 4.1.x fileUpload Problems
              Pavol Pitonak Master

              Hi Joshua,

              In IE 8 the header part of the component that is rendedered which has the various buttons (Click to Add, Upload, Clear All)

               

              disappears if I choose a file but then click "Clear All". In chrome this does not occur. I tried various scenarios, and what seems to make it break is in IE 8 if you click to add the max number of files that is specified in maxFilesQuantity and then click clear all the header disappears. If my max is 3 and I only click to add 2 then it works fine, but if I click to add 3 then the header disappears.

              I was able to reproduce the bug and reported it in Jira https://issues.jboss.org/browse/RF-11580.

               

              I could not reproduce the second bug. However, according to the stacktrace, it seems that you're using Spring in your app. Could you please provide some simple app for us to reproduce?

               

              Regards,

              Palo

              • 4. Re: RichFaces 4.1.x fileUpload Problems
                Joshua Brookes Newbie

                Hi Palo,

                 

                In the process of putting together a small sample project to illuminate the issue, I discovered that the problem appears to be a compatibility issue with recent changes in RichFaces 4.1 and Apache MyFaces Orchestra. I use Orchestra for the conversation scope feature. What I found is that by simply adding the org.apache.myfaces.orchestra.conversation.servlet.ConversationManagerSessionListener listener in web.xml the fileUpload component stops working. This did not pose a problem with RichFaces 4.0.0.Final.

                 

                I also am seeing more detailed errors in my logs that show this to be a multipart request issue. Here is the stacktrace:

                 

                {code}

                11:45:01,219 ERROR [][[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception

                java.lang.UnsupportedOperationException

                          at javax.faces.context.FacesContext.getExceptionHandler(FacesContext.java:280)

                          at javax.faces.context.FacesContextWrapper.getExceptionHandler(FacesContextWrapper.java:354)

                          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)

                          at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)

                          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

                          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)

                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                          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:235)

                          at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:191)

                          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)

                          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

                          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

                          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)

                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

                11:45:01,266 SEVERE [][Application] 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

                11:45:01,266 ERROR [][OrchestraFacesContextFactory] Problem initialising RequestHandler

                java.lang.NullPointerException

                          at org.richfaces.request.MultipartRequest25.getParameter(MultipartRequest25.java:115)

                          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)

                11:45:01,266 ERROR [][[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception

                java.lang.NullPointerException

                          at org.richfaces.request.MultipartRequest25.getParameter(MultipartRequest25.java:115)

                          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)

                11:45:01,266 ERROR [][[localhost]] Exception Processing ErrorPage[errorCode=500, location=/resources/errors/fatalException.xhtml]

                java.lang.NullPointerException

                          at org.richfaces.request.MultipartRequest25.getParameter(MultipartRequest25.java:115)

                          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)

                {code}

                 

                I will attach the sample project and war file. I am testing this attached app in JBoss AS 5.0.1 with Mojarra 2.1.3.

                 

                Thanks,

                Josh

                • 5. Re: RichFaces 4.1.x fileUpload Problems
                  Pavol Pitonak Master

                  Could you please report the issue in Jira (https://issues.jboss.org/browse/RF)?

                  • 7. Re: RichFaces 4.1.x fileUpload Problems
                    Joshua Brookes Newbie

                    Palo,

                     

                    Could this be related to the issue described in http://community.jboss.org/message/598858 and https://issues.jboss.org/browse/RF-10128? We are not using MyFaces, but Orchestra is a sub-project of MyFaces. I'm wondering if something was done to fix compatibility prior to 4.0.0.Final and this may have been dropped in 4.1.0 M1.

                     

                    Thanks,

                    Josh

                    • 8. Re: RichFaces 4.1.x fileUpload Problems
                      Joshua Brookes Newbie

                      I'm not seeing any activity on this. Any chance of getting this addressed for 4.1? If not I need to steer my project away to Primefaces for file uploads.

                      • 9. Re: RichFaces 4.1.x fileUpload Problems
                        Lukáš Fryč Master

                        Hello Joshua,

                         

                        since this issue is affecting interoperability with third-party lib,

                        we are not able to address it so late in process for 4.1.

                         

                        But I'm totally supporting you to investigate issue at your own

                        and encouraging you to provide the patch back to community!

                         

                        If I can be any help to you, just connect richfaces#irc.freenode.net.

                         

                         

                        Regards,

                         

                        ~ Lukas