2 Replies Latest reply on Jan 31, 2011 4:43 AM by Ilya Shaikovsky

    Upload file info disappear upon click Upload button

    Song Wang Newbie

      I use JSF 1.2 and IE 6.

       

      I use the following code for file upload. I can click "+Add" button to add a file, and the "Upload" button appears. But if I click the "Upload" button, sometimes the file cannot be uploaded. This issue always happens when I do it for the first time when it happens, sometimes even for the first time it doesn't happen. It looks like it tries to upload the file because the file information seems to be there for less than 0.5 second and then disappears.

       

      Does anyone happen across this issue? Any idea how to resolve it? Screenshot attached - this is after I click "+Add", when I click "Upload" that information will disappear. Thanks!

       

      <h:panelGroup>        

          <rich:fileUpload

           fileUploadListener="#{ingestPageBean.listener}"

           maxFilesQuantity="1" id="upload0"

           immediateUpload="#{ingestPageBean.autoUpload}"

           allowFlash="#{ingestPageBean.useFlash}"

           rendered="#{ingestPageBean.ingestFile == null}"

           immediate="true" listHeight="50" required="true">

           <a4j:support event="onuploadcomplete" reRender="out0" limitToList="out0" />

          </rich:fileUpload>        

         </h:panelGroup>

        • 1. Upload file info disappear upon click Upload button
          Song Wang Newbie

          Here is the error message on the console when  it happens:

           

          Jan 26, 2011 9:58:40 AM com.sun.faces.lifecycle.Phase doPhase

          SEVERE: JSF1054: (Phase ID: RESTORE_VIEW 1, View ID: /pages/ingest/ingestPage.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1168b43]

          09:58:40,115 ERROR BaseXMLFilter:227 - Exception in the filter chain

          javax.servlet.ServletException: Parent was not null, but this component not related

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)

          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:367)

          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at com.cibc.ecmss.genericviewer.web.filter.SSOFilter.doFilter(SSOFilter.java:80)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

          at java.lang.Thread.run(Thread.java:619)

          Caused by: java.lang.IllegalStateException: Parent was not null, but this component not related

          at javax.faces.component.UIComponentBase.eraseParent(UIComponentBase.java:524)

          at javax.faces.component.UIComponentBase.access$300(UIComponentBase.java:92)

          at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:1871)

          at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:1846)

          at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:207)

          at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

          at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)

          at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)

          at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

          at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)

          at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)

          at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

          at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)

          at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)

          at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)

          at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:136)

          at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:337)

          at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:307)

          at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)

          at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

          at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

          at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

          at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:39)

          at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)

          at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)

          at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)

          at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)

          at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:116)

          at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

          at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:39)

          at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)

          at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:526)

          at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:342)

          at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:107)

          at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:179)

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)

          at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:102)

          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)

          ... 21 more

          Jan 26, 2011 9:58:40 AM org.apache.catalina.core.StandardWrapperValve invoke

          SEVERE: Servlet.service() for servlet Faces Servlet threw exception

          java.lang.IllegalStateException: Parent was not null, but this component not related

          at javax.faces.component.UIComponentBase.eraseParent(UIComponentBase.java:524)

          at javax.faces.component.UIComponentBase.access$300(UIComponentBase.java:92)

          at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:1871)

          at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:1846)

          at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:207)

          at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

          at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)

          at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)

          at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

          at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)

          at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)

          at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

          at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:360)

          at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:190)

          at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)

          at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:136)

          at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:337)

          at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:307)

          at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)

          at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

          at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

          at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

          at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:39)

          at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)

          at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)

          at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)

          at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)

          at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:116)

          at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

          at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:39)

          at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)

          at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:526)

          at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:342)

          at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:107)

          at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:179)

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)

          at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:102)

          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)

          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:367)

          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at com.cibc.ecmss.genericviewer.web.filter.SSOFilter.doFilter(SSOFilter.java:80)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

          at java.lang.Thread.run(Thread.java:619)

          • 2. Upload file info disappear upon click Upload button
            Ilya Shaikovsky Master

            At first RichFaces filter should be first in filters chain. And in your case I'm seeing SSO filter called before.