ICEfaces
  1. ICEfaces
  2. ICE-3593

inputFile causes setAttribute/removeAttribute to throw NPE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2
    • Fix Version/s: 1.7.2, 1.8DR#1, 1.8
    • Component/s: Framework, ICE-Components
    • Labels:
      None
    • Environment:
      Seam 2.1.0 CR1, JBoss 4.2.[2,3]

      Description

      This is fall-out from adding the attribute copying for the Seam debug page. With Seam, when doing a file upload, it will occasionally throw the following exception. We can consume the exception, but it's not clear how to avoid the situation from occurring in the first place.

      NPE:
      org.apache.catalina.connector.Request.setAttribute(Request.java:1424)
      org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:503)
      javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:284)
      com.icesoft.faces.webapp.http.servlet.ServletRequestAttributes.setAttribute(ServletRequestAttributes.java:28)
      com.icesoft.faces.webapp.http.servlet.ServletEnvironmentRequest.setAttribute(ServletEnvironmentRequest.java:216)
      com.icesoft.faces.webapp.http.servlet.ServletRequestAttributeMap.setAttribute(ServletRequestAttributeMap.java:25)
      com.icesoft.faces.context.AbstractCopyingAttributeMap.put(AbstractCopyingAttributeMap.java:22)
      java.util.Collections$SynchronizedMap.put(Collections.java:1983)
      com.sun.faces.util.RequestStateManager.getStateMap(RequestStateManager.java:281)
      com.sun.faces.util.RequestStateManager.set(RequestStateManager.java:223)
      com.sun.faces.el.FacesCompositeELResolver.setChainType(FacesCompositeELResolver.java:159)
      com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:71)
      org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
      org.jboss.el.parser.AstValue.getTarget(AstValue.java:34)
      org.jboss.el.parser.AstValue.invoke(AstValue.java:95)
      org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
      com.icesoft.faces.component.inputfile.InputFile.setProgress(InputFile.java:945)
      com.icesoft.faces.component.inputfile.InputFile.setProgressSafely(InputFile.java:929)
      com.icesoft.faces.component.inputfile.InputFile.updateProgress(InputFile.java:955)
      com.icesoft.faces.webapp.http.core.UploadServer$ProgressCalculator.potentiallyNotify(UploadServer.java:195)
      com.icesoft.faces.webapp.http.core.UploadServer$ProgressCalculator.potentiallyNotify(UploadServer.java:182)
      com.icesoft.faces.webapp.http.core.UploadServer$ProgressCalculator.setListenerAndContextAndPFS(UploadServer.java:162)
      com.icesoft.faces.webapp.http.core.UploadServer$2.servlet(UploadServer.java:78)
      com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.detectEnvironment(ServletRequestResponse.java:228)
      com.icesoft.faces.webapp.http.core.UploadServer.service(UploadServer.java:52)
      com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
      com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
      com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38)
      com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
      com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
      com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55)
      com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
      com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      java.lang.Thread.run(Thread.java:595)

        Activity

        Mark Collette created issue -
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17714 Mon Oct 06 11:31:01 MDT 2008 mark.collette ICE-3593 : inputFile causes setAttribute/removeAttribute to throw NPE
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/ServletRequestAttributes.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17715 Mon Oct 06 11:31:18 MDT 2008 mark.collette ICE-3593 : inputFile causes setAttribute/removeAttribute to throw NPE
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/ServletRequestAttributes.java
        Hide
        Mark Collette added a comment -

        During a file upload, we do several server pushes for a single request/response. Certain versions of JSF try to set different attributes into the request map during this time. The request object can be in a state of not wanting to modify the original request that late in the game. So we'll just catch the exception for now.

        TRUNK
        Subversion 17714
        ICEfaces 1.7 branch
        Subversion 17715
        icefaces\core\src\com\icesoft\faces\webapp\http\servlet\ServletRequestAttributes.java

        Show
        Mark Collette added a comment - During a file upload, we do several server pushes for a single request/response. Certain versions of JSF try to set different attributes into the request map during this time. The request object can be in a state of not wanting to modify the original request that late in the game. So we'll just catch the exception for now. TRUNK Subversion 17714 ICEfaces 1.7 branch Subversion 17715 icefaces\core\src\com\icesoft\faces\webapp\http\servlet\ServletRequestAttributes.java
        Mark Collette made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.7.2 [ 10130 ]
        Fix Version/s 1.8DR#1 [ 10141 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 1.8 [ 10161 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: