Uploaded image for project: 'Portlet Bridge'
  1. Portlet Bridge
  2. PBR-170

Upload of files with component rich:fileUpload throws an exception when h:selectManyCheckbox also used on same page and one checkbox was selected

    Details

    • Steps to Reproduce:
      Hide

      Build a Page whith an h:selectManyCheckbox in combination of f:selectItems and a rich:fileUpload-component and select one checkbox from the group and upload a file.

      Show
      Build a Page whith an h:selectManyCheckbox in combination of f:selectItems and a rich:fileUpload-component and select one checkbox from the group and upload a file.

      Description

      If I have the component h:selectManyCheckbox in combination with f:selectItems by using an Array of Strings and I am using the component rich:fileUpload the selection of the file works, but after pressing the upload button, the following exception occurs, only if one item is select in the checkbox group (0 items or 2 ore more working fine):

      08:45:53,437 WARN [lifecycle] java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;
      javax.faces.FacesException: java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;
      at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:675)
      at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:650)
      at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:681)
      at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:650)
      at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:681)
      at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:650)
      at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:221)
      at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:412)
      at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      at org.jboss.portletbridge.AjaxPortletBridge.execute(AjaxPortletBridge.java:1096)
      at org.jboss.portletbridge.AjaxPortletBridge.doFacesRequest(AjaxPortletBridge.java:824)
      at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:541)
      at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:574)
      at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:184)
      at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:84)
      at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:505)
      at org.jboss.portal.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeRequired$aop(TransactionInterceptor.java:117)
      at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeRequired_N7979132061380150447.invokeNext(TransactionInterceptor$invokeRequired_N7979132061380150447.java)
      at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
      at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeRequired_N7979132061380150447.invokeNext(TransactionInterceptor$invokeRequired_N7979132061380150447.java)

      ...

      followed by:

      08:45:53,531 WARN [lifecycle] executePhase(APPLY_REQUEST_VALUES 2,org.jboss.portletbridge.context.FacesContextImpl@1ad7c17) threw exception
      javax.faces.FacesException: java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;
      at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:109)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      at org.jboss.portletbridge.AjaxPortletBridge.execute(AjaxPortletBridge.java:1096)
      at org.jboss.portletbridge.AjaxPortletBridge.doFacesRequest(AjaxPortletBridge.java:824)
      at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:541)
      at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:574)
      at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:184)
      at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:84)
      at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:505)
      at org.jboss.portal.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
      at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
      at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeRequired$aop(TransactionInterceptor.java:117)

      ...

      As mentioned before, this occured only, if one item is selected in the check box group. It lokks like there is processed only on String instead of the one String embedded in an array. I have got more than one h:selectManyCheckbox-Items on the page and if I select one item in any of them, the error occured.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                stefan_tausendpfund Stefan Tausendpfund
                Reporter:
                tdevos09 Thorsten de vos
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: