jsf-extensions
  1. jsf-extensions
  2. JSF_EXTENSIONS-62

DynaFaces jars cause blueprints fileupload component to fail

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Incomplete
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      62

      Description

      In the SDK b07, when SWDP is installed the file-upload component in bpcatalog
      stops working. This problem happens only when SWDP is installed. Since the same
      component is used in petstore as well, the seller upload feature of the petstore
      doesnt work either.

      Steps to reproduce:
      1. Install SDK b07 with SWDP enabled
      2. cd blueprints/bpcatalog/apps/webtier/bp-file-upload
      3. ant run
      4. go to http://localhost:8080/bp-file-upload/faces/index.jsp
      and select a file to upload. The pop-up box does not return the intended
      result. (try it without SWDP installed to see what results are expected).

        Activity

        Hide
        Ed Burns added a comment -

        Here is my hardware/software stack. Let's call this Mac Stack 1.

        Apple Powerbook G4
        Mac OS X 10.4.8
        java 1.5.0_06
        SJSAS-b33d-20070213
        TARGET_R1 build 952

        With Mac Stack 1 and a fresh source build of the bp-file-upload example I see
        the following.

        FileUpload Test Section 1 works

        FileUpload Test Section 2 works.

        By works I mean

        • I see the progress bar. It updates dynamically via ajax as the file is uploaded
        • I see the Alert window that shows information when the upload is complete.
          the information in the Alert window is as expected.

        I will now test this on Solaris x86.

        Show
        Ed Burns added a comment - Here is my hardware/software stack. Let's call this Mac Stack 1. Apple Powerbook G4 Mac OS X 10.4.8 java 1.5.0_06 SJSAS-b33d-20070213 TARGET_R1 build 952 With Mac Stack 1 and a fresh source build of the bp-file-upload example I see the following. FileUpload Test Section 1 works FileUpload Test Section 2 works. By works I mean I see the progress bar. It updates dynamically via ajax as the file is uploaded I see the Alert window that shows information when the upload is complete. the information in the Alert window is as expected. I will now test this on Solaris x86.
        Hide
        Ed Burns added a comment -

        Please add to Mac Stack 1: Firefox 1.5.0.9.

        Show
        Ed Burns added a comment - Please add to Mac Stack 1: Firefox 1.5.0.9.
        Hide
        inder added a comment -

        I saw this problem on Windows XP with Java SE 6 and Java Application Platform
        SDK b07.

        Show
        inder added a comment - I saw this problem on Windows XP with Java SE 6 and Java Application Platform SDK b07.
        Hide
        Rajiv Mordani added a comment -

        I was able to reproduce it on solaris x86 with Java SE 6. Here is the stack
        trace on the server side that I see -

        [#|2007-02-16T15:38:54.898-0800|SEVERE|sun-appserver9.1|com.sun.javaee.blueprints.components.ui.fileupload|_ThreadID=29;_ThreadName=httpSSLWorkerThread-38080-17;_RequestID=21dd4f73-7e14-488e-b6bf-36da8629d232;|The
        FileUpload process encountered an exception while writing the AJAX response.
        java.lang.NullPointerException
        at
        com.sun.javaee.blueprints.components.ui.fileupload.FileUploadHandler.writeUploadResponse(FileUploadHandler.java:440)
        at
        com.sun.javaee.blueprints.components.ui.fileupload.FileUploadHandler.handleFileUploadFinal(FileUploadHandler.java:157)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
        at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
        at
        com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
        at
        org.apache.shale.remoting.impl.MethodBindingProcessor.process(MethodBindingProcessor.java:122)
        at org.apache.shale.remoting.faces.RemotingPhaseListener.afterPhase(Remo:
        tingPhaseListener.java:125)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:278)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
        at
        org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
        at
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
        at
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
        at
        com.sun.javaee.blueprints.petstore.controller.EntryFilter.doFilter(EntryFilter.java:88)
        at
        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
        at
        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
        at
        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
        at
        org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
        at
        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j
        ava:611)
        at
        org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:81)
        at
        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207)
        at
        org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
        at
        org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
        at
        org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
        at
        org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
        at
        org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
        at
        org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
        a:558)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249)
        at
        com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
        at
        com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
        at
        com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
        at
        com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
        at
        com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
        at
        com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLW:
        orkerThread.java:93)

        • Rajiv
        Show
        Rajiv Mordani added a comment - I was able to reproduce it on solaris x86 with Java SE 6. Here is the stack trace on the server side that I see - [#|2007-02-16T15:38:54.898-0800|SEVERE|sun-appserver9.1|com.sun.javaee.blueprints.components.ui.fileupload|_ThreadID=29;_ThreadName=httpSSLWorkerThread-38080-17;_RequestID=21dd4f73-7e14-488e-b6bf-36da8629d232;|The FileUpload process encountered an exception while writing the AJAX response. java.lang.NullPointerException at com.sun.javaee.blueprints.components.ui.fileupload.FileUploadHandler.writeUploadResponse(FileUploadHandler.java:440) at com.sun.javaee.blueprints.components.ui.fileupload.FileUploadHandler.handleFileUploadFinal(FileUploadHandler.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(AstValue.java:157) at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283) at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77) at org.apache.shale.remoting.impl.MethodBindingProcessor.process(MethodBindingProcessor.java:122) at org.apache.shale.remoting.faces.RemotingPhaseListener.afterPhase(Remo: tingPhaseListener.java:125) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:278) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) at com.sun.javaee.blueprints.petstore.controller.EntryFilter.doFilter(EntryFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j ava:611) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:81) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:558) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLW: orkerThread.java:93) Rajiv
        Hide
        Ryan Lubke added a comment -

        The NPE occurs because FileUploadStatus.setUploadComplete() is never called.

        The above method is never called since there is an ELException further up in the
        log:

        ---------------------------------------
        [#|2007-02-17T20:39:03.883-0800|WARNING|sun-appserver9.1|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadI
        D=19;_ThreadName=httpSSLWorkerThread-38080-1;_RequestID=dfe09787-986f-41dc-a14a-557c41df1de1;|phase(RESTORE_VIEW
        1,com
        .sun.faces.context.FacesContextImpl@19e5b98) threw exception:
        javax.faces.el.EvaluationException: java.lang.NoSuchMeth
        odError:
        org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(Lorg/apache/commons/fileupload/RequestCo
        ntext;)Ljava/util/List; java.lang.NoSuchMethodError:
        org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequ
        est(Lorg/apache/commons/fileupload/RequestContext;)Ljava/util/List;

        -----------------------------------------------------------------

        Looking into why the method isn't found.

        Show
        Ryan Lubke added a comment - The NPE occurs because FileUploadStatus.setUploadComplete() is never called. The above method is never called since there is an ELException further up in the log: --------------------------------------- [#|2007-02-17T20:39:03.883-0800|WARNING|sun-appserver9.1|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadI D=19;_ThreadName=httpSSLWorkerThread-38080-1;_RequestID=dfe09787-986f-41dc-a14a-557c41df1de1;|phase(RESTORE_VIEW 1,com .sun.faces.context.FacesContextImpl@19e5b98) threw exception: javax.faces.el.EvaluationException: java.lang.NoSuchMeth odError: org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(Lorg/apache/commons/fileupload/RequestCo ntext;)Ljava/util/List; java.lang.NoSuchMethodError: org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequ est(Lorg/apache/commons/fileupload/RequestContext;)Ljava/util/List; ----------------------------------------------------------------- Looking into why the method isn't found.
        Hide
        Ryan Lubke added a comment -

        Looks like commons-fileupload-1.0.1 is installed in domain1/lib. Petstore
        requires commons-fileupload-1.1.1. Replacing the older jar in domain1/lib with
        the one included in Petstore (including commons-io) seemed to resolve the issue.

        I'm not sure domain1/lib version of fileupload is coming from (obviously some
        installer)

        Show
        Ryan Lubke added a comment - Looks like commons-fileupload-1.0.1 is installed in domain1/lib. Petstore requires commons-fileupload-1.1.1. Replacing the older jar in domain1/lib with the one included in Petstore (including commons-io) seemed to resolve the issue. I'm not sure domain1/lib version of fileupload is coming from (obviously some installer)
        Hide
        inder added a comment -

        This bug is being caused by the portlet container, NOT SWDP.

        Show
        inder added a comment - This bug is being caused by the portlet container, NOT SWDP.

          People

          • Assignee:
            jsf-extensions-issues
            Reporter:
            inder
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: