Topic
7 replies Latest Post - ‏2012-05-31T16:12:05Z by Ravi_Hariharan
romskom1981
romskom1981
5 Posts
ACCEPTED ANSWER

Pinned topic Problem with <hx:fileupload /> component

‏2012-03-11T05:20:49Z |
Hello! I am trying to upload file to server using <hx:fileupload /> component.

I am using this form.

<hx:scriptCollector id=
"scriptCollector1">   <h:form styleClass=
"form" id=
"form1"> <hx:fileupload styleClass=
"fileupload" id=
"fileupload1" value=
"#{pc_Main.contentAsString}" required=
"false"> <hx:fileProp name=
"fileName" value=
"#{pc_Main.fileName}" /> <hx:fileProp name=
"contentType" value=
"#{pc_Main.contentType}" /> </hx:fileupload> <h:commandButton value=
"Отправить"/> </h:form> </hx:scriptCollector>

When I send file to server, I get error:

[3/11/12 10:14:21:865 YEKT] 000000cb lifecycle     E   JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: 
"") Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@51af51af] [3/11/12 10:14:21:867 YEKT] 000000cb servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet Faces Servlet in application TJSFProjEAR. Exception created : javax.servlet.ServletException at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604) Caused by: java.lang.StringIndexOutOfBoundsException at java.lang.String.substring(String.java:1093) at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:153) at com.ibm.faces.application.DevelopmentStateManager.restoreView(DevelopmentStateManager.java:101) at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:337) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:176) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) ... 20 more   [3/11/12 10:14:21:868 YEKT] 000000cb webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[Faces Servlet]: java.lang.StringIndexOutOfBoundsException at java.lang.String.substring(String.java:1093) at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:153) at com.ibm.faces.application.DevelopmentStateManager.restoreView(DevelopmentStateManager.java:101) at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:337) at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:176) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)

How can i use <hx:fileupload /> component???
Updated on 2012-05-31T16:12:05Z at 2012-05-31T16:12:05Z by Ravi_Hariharan
  • romskom1981
    romskom1981
    5 Posts
    ACCEPTED ANSWER

    Re: Problem with &lt;hx:fileupload /&gt; component

    ‏2012-03-11T05:23:09Z  in response to romskom1981
    I am using Rational Application Developer for WS 8.0.4 and WAS Test Env v 7.0.19.
    • SystemAdmin
      SystemAdmin
      14225 Posts
      ACCEPTED ANSWER

      Re: Problem with &lt;hx:fileupload /&gt; component

      ‏2012-03-12T15:28:03Z  in response to romskom1981
      Hello,

      There is a known issue with the file upload component in that particular RAD version. It has already been fixed in a later version of the jsf library. Please contact IBM support and mention them the following tech note so they can provide you with the latest version of the JavasServer Faces Widgets Library (JWL).

      http://www-01.ibm.com/support/docview.wss?uid=swg21584996
      • romskom1981
        romskom1981
        5 Posts
        ACCEPTED ANSWER

        Re: Problem with &lt;hx:fileupload /&gt; component

        ‏2012-03-14T03:40:28Z  in response to SystemAdmin
        Thanks!
        I have looked for newer version of JWL on IBM Fix central but find nothing.
        How can I get this fix? Should I send the PMR?
        • Ravi_Hariharan
          Ravi_Hariharan
          8 Posts
          ACCEPTED ANSWER

          Re: Problem with &lt;hx:fileupload /&gt; component

          ‏2012-05-30T21:03:30Z  in response to romskom1981
          Hi ,

          I got the same issue. did u get any fix

          
          SRVE0293E: [Servlet Error]-[Faces Servlet]: java.lang.StringIndexOutOfBoundsException at java.lang.String.substring(String.java:1093) at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:153) at com.ibm.faces.application.DevelopmentStateManager.restoreView(DevelopmentStateManager.java:101)
          
          • SystemAdmin
            SystemAdmin
            14225 Posts
            ACCEPTED ANSWER

            Re: Problem with &lt;hx:fileupload /&gt; component

            ‏2012-05-31T15:32:31Z  in response to Ravi_Hariharan
            The JWL 3.0.13 is included in RAD 8.0.4.1. Have you tried that update?

            If you are still using RAD 7.5, then you could contact Rational Client Support and request a TestFix.

            Thank you and regards, Lara
            • Ravi_Hariharan
              Ravi_Hariharan
              8 Posts
              ACCEPTED ANSWER

              Re: Problem with &lt;hx:fileupload /&gt; component

              ‏2012-05-31T16:12:05Z  in response to SystemAdmin
              Hi Lara,

              I am using Rational Business developer 8.0.1.3 and request for the latest JWL. RBD has not released the new version of RBD fix pack.

              Ravi
          • Ravi_Hariharan
            Ravi_Hariharan
            8 Posts
            ACCEPTED ANSWER

            Re: Problem with &lt;hx:fileupload /&gt; component

            ‏2012-05-31T16:09:07Z  in response to Ravi_Hariharan
            I raised a PMR for the latest JWL and the code worked.

            84382.057.649.JWL3_1_14_20120523_0912 was the version given for test.