Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-12705

File upload fails with IllegalStateException when PicketLink SSO is enabled.

XMLWordPrintable

      File Upload is throwing an exception when JBoss 7.2 is configured with SSO enabled(Picketlink).
      For every request param we are calling String getParameter(String name) in https://access.redhat.com/webassets/avalon/d/red-hat-jboss-enterprise-application-platform/7.2.beta/javadocs/javax/servlet/ServletRequest.html#getParameter-java.lang.String-this
      which is wrapped by https://access.redhat.com/webassets/avalon/d/red-hat-jboss-enterprise-application-platform/7.2.beta/javadocs/org/picketlink/identity/federation/bindings/wildfly/sp/SPFormAuthenticationRequestWrapper.html
      and as a result throws the following error when we call getParameter(filename)

      java.lang.IllegalStateException: UT000017: Form value is a file, use getFileItem() instead
              at io.undertow.server.handlers.form.FormData$FormValueImpl.getValue(FormData.java:304) ~[undertow-core-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              at org.picketlink.identity.federation.bindings.wildfly.sp.SPFormAuthenticationRequestWrapper.getParameter(SPFormAuthenticationRequestWrapper.java:73) ~[picketlink-wildfly8-2.5.5.SP12-redhat-00005.jar!/:2.5.5.SP12-redhat-00005]
              ...
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:706) ~[jboss-servlet-api_4.0_spec-1.0.0.Final-redhat-1.jar!/:1.0.0.Final-redhat-1]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) ~[jboss-servlet-api_4.0_spec-1.0.0.Final-redhat-1.jar!/:1.0.0.Final-redhat-1]
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433) ~[jastow-2.0.7.Final-redhat-00001.jar!/:2.0.7.Final-redhat-00001]
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403) ~[jastow-2.0.7.Final-redhat-00001.jar!/:2.0.7.Final-redhat-00001]
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347) ~[jastow-2.0.7.Final-redhat-00001.jar!/:2.0.7.Final-redhat-00001]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:791) ~[jboss-servlet-api_4.0_spec-1.0.0.Final-redhat-1.jar!/:1.0.0.Final-redhat-1]
              at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              ...
              at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              ...
              at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-2.0.20.Final-redhat-00001.jar!/:2.0.20.Final-redhat-00001]
              ...
      

      This error does not occur on JBoss 7.1.0 but breaks on JBoss 7.1.2 may have been introduced by https://issues.jboss.org/browse/JBEAP-10449

              rhn-support-ivassile Ilia Vassilev
              rhn-support-ivassile Ilia Vassilev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: