0 Replies Latest reply on Jul 4, 2011 5:32 AM by ouis

    RichFaces 3.3.1 upload problems

    ouis

      Hello,

       

       

      im writing to you cause i really dont find my problem :

       

      We have a setup with a tomcat 6.0.20 under a 2.2.15 Apache reverse proxy.

      When people do upload on our IHM, 80% of the time, it works, but 20% of the time, even with files < 50Kb, upload fails with the classic 'transfer error occured'.

       

      The real problem in the tomcat log is :

       

      java.lang.ArrayIndexOutOfBoundsException

          at java.lang.System.arraycopy(Native Method)

          at org.ajax4jsf.request.MultipartRequest.fillBuffer(MultipartRequest.java:396)

          at org.ajax4jsf.request.MultipartRequest.initialize(MultipartRequest.java:600)

          at org.ajax4jsf.request.MultipartRequest.getParam(MultipartRequest.java:804)

          at org.ajax4jsf.request.MultipartRequest.getParameter(MultipartRequest.java:870)

          at org.springframework.web.servlet.i18n.LocaleChangeInterceptor.preHandle(LocaleChangeInterceptor.java:60)

          at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:865)

          at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)

          at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)

          at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

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

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

          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:347)

          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

       

       

      The log in the Reverse proxy looks like :

       

      xx.xx.xx.xx - - [29/Jun/2011:14:36:25 +0200] "POST /app/spring/main?execution=e1s2&_richfaces_upload_uid=0.32835176608457883&uploadForm:filefield=uploadForm:filefield&_richfaces_upload_file_indicator=true&AJAXREQUEST=j_id91 HTTP/1.1" 500 189 "https://app.site.net/app/spring/main?execution=e1s2" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)"

       

       

      I thought while seeing this that it could come from Apache or registry problem (my Apache and tomcat are on 2 windows servers), but if it was this kind of prob, 100% uploads would fail..

       

      Thanks in advance for help...

       

      Here are my RF implementations :

      RichFaces 3.3.1.GA

       

      Filters :

       

      <filter>

          <display-name>RichFaces Filter</display-name>

          <filter-name>richfaces</filter-name>

          <filter-class>be.nbb.aag.temp.filter.AjaxAfterTerosFilter</filter-class>

          <init-param>

              <param-name>createTempFiles</param-name>

              <param-value>true</param-value>

            </init-param>

            <init-param>

              <param-name>maxRequestSize</param-name>

              <param-value>200000000</param-value>

            </init-param>

        </filter>

        <filter-mapping>

          <filter-name>richfaces</filter-name>

          <servlet-name>Spring Web MVC Dispatcher Servlet</servlet-name>

          <dispatcher>REQUEST</dispatcher>

          <dispatcher>FORWARD</dispatcher>

          <dispatcher>INCLUDE</dispatcher>

        </filter-mapping>

       

      Regards,

      ouis