Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2231

jsf1 jsp portlet fails to submit when file is uploaded

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: liferay-faces-2.1.5-ga6, liferay-faces-2.2.5-ga6
    • Fix Version/s: None
    • Labels:
      None

      Description

      Steps to reproduce:

      1. Deploy and navigate to the JSF1-JSP-portlet.
      2. Fill out the form.
      3. Click Add Attatchment.
      4. Upload a file and click Submit for the file uploader.
      5. Click Submit for the form.

      If the bug still exists, an "Internal Server Error" message will appear and the following exception will appear in the logs:

      javax.portlet.faces.BridgeException: javax.portlet.faces.BridgeException: javax.faces.FacesException: #{applicantBackingBean.submit}: java.lang.ClassCastException: com.liferay.faces.util.model.internal.UploadedFileImpl cannot be cast to com.liferay.faces.bridge.model.UploadedFile
      	at com.liferay.faces.bridge.internal.BridgePhaseActionImpl.execute(BridgePhaseActionImpl.java:133)
      	at com.liferay.faces.bridge.internal.BridgeImpl.doFacesRequest(BridgeImpl.java:93)
      	at javax.portlet.faces.GenericFacesPortlet.processAction(GenericFacesPortlet.java:152)
      	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71)
      	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
      	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:112)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	...
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.portlet.faces.BridgeException: javax.faces.FacesException: #{applicantBackingBean.submit}: java.lang.ClassCastException: com.liferay.faces.util.model.internal.UploadedFileImpl cannot be cast to com.liferay.faces.bridge.model.UploadedFile
      	at com.liferay.faces.bridge.internal.BridgePhaseActionImpl.execute(BridgePhaseActionImpl.java:99)
      	... 138 more
      Caused by: javax.faces.FacesException: #{applicantBackingBean.submit}: java.lang.ClassCastException: com.liferay.faces.util.model.internal.UploadedFileImpl cannot be cast to com.liferay.faces.bridge.model.UploadedFile
      	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:89)
      	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      	at com.liferay.faces.bridge.internal.BridgePhaseActionImpl.execute(BridgePhaseActionImpl.java:93)
      	... 138 more
      Caused by: javax.faces.FacesException: #{applicantBackingBean.submit}: java.lang.ClassCastException: com.liferay.faces.util.model.internal.UploadedFileImpl cannot be cast to com.liferay.faces.bridge.model.UploadedFile
      	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:117)
      	at javax.faces.component.UICommand.broadcast(UICommand.java:315)
      	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786)
      	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1251)
      	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
      	... 141 more
      Caused by: javax.faces.el.EvaluationException: java.lang.ClassCastException: com.liferay.faces.util.model.internal.UploadedFileImpl cannot be cast to com.liferay.faces.bridge.model.UploadedFile
      	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:101)
      	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
      	... 145 more
      Caused by: java.lang.ClassCastException: com.liferay.faces.util.model.internal.UploadedFileImpl cannot be cast to com.liferay.faces.bridge.model.UploadedFile
      	at com.liferay.faces.demos.bean.ApplicantBackingBean.submit(ApplicantBackingBean.java:126)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.apache.el.parser.AstValue.invoke(AstValue.java:278)
      	at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
      	at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:70)
      	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
      	... 146 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kyle.stiemann Kyle Stiemann (Inactive)
                Reporter:
                kyle.stiemann Kyle Stiemann (Inactive)
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package