ICEfaces
  1. ICEfaces
  2. ICE-964

ice:outputStyle or ServletEnvironmentRequest header exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6DR#3, 1.6
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Operating System: Windows 2000
      Platform: PC

      Description

      The output html looks fine, no functional problem so far.

      Using any page with ice:outputStyle,

      we have the following exception:


      [#|2006-11-03T13:10:47.154-0700|SEVERE|sun-appserver-pe8.2|
      com.icesoft.faces.component.style.OutputStyleRenderer|_ThreadID=16;|
      Error in OutputStyleRenderer
      java.lang.NullPointerException
              at
      com.icesoft.faces.env.ServletEnvironmentRequest.getHeader(ServletEnvironmentRequest.java:229)
              at
      com.icesoft.faces.component.style.OutputStyleRenderer.browserType(OutputStyleRenderer.java:132)
              at
      com.icesoft.faces.component.style.OutputStyleRenderer.encodeEnd(OutputStyleRenderer.java:77)
              at
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)
              at
      com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:545)
              at
      com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
              at
      com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
              at
      com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
              at
      com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:541)
              at
      com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:527)
              at
      com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
              at
      com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:311)
              at
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
              at
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
              at
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
              at
      com.icesoft.faces.webapp.xmlhttp.BlockingServlet.renderCyclePartial(BlockingServlet.java:425)
              at
      com.icesoft.faces.webapp.xmlhttp.BlockingServlet.receiveUpdates(BlockingServlet.java:393)
              at
      com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:263)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
              at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
              at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.apache.catalina.security.SecurityUtil
      $1.run(SecurityUtil.java:249)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
              at
      org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
              at
      org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
              at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
              at org.apache.catalina.core.ApplicationFilterChain.access
      $000(ApplicationFilterChain.java:55)
              at org.apache.catalina.core.ApplicationFilterChain
      $1.run(ApplicationFilterChain.java:161)
              at java.security.AccessController.doPrivileged(Native Method)
              at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
              at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
              at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
              at
      org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
              at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
              at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
              at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
              at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
              at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEn

        Issue Links

          Activity

          Hide
          Ted Goddard added a comment -

          Do we need this fixed further this release, or is the component fix sufficient?

          Show
          Ted Goddard added a comment - Do we need this fixed further this release, or is the component fix sufficient?
          Hide
          Adnan Durrani added a comment -

          This bug still exist(1.6 DR#2). The outputStyleRenderer asks for the user_agent from the headers of HttpServletRequest and if not found then asks from the component itself. However attempt to get user_agent from request throws a NullPointerException. This is due to the fact that headers hashTable is null in ServletEnvironmentRequest and the other issue is that hashTable key's are case sensitive and OutputStyleHeader makes the following call:

          request.getHeader("User-Agent")

          should be replaced with:

          request.getHeader("user-agent")

          Show
          Adnan Durrani added a comment - This bug still exist(1.6 DR#2). The outputStyleRenderer asks for the user_agent from the headers of HttpServletRequest and if not found then asks from the component itself. However attempt to get user_agent from request throws a NullPointerException. This is due to the fact that headers hashTable is null in ServletEnvironmentRequest and the other issue is that hashTable key's are case sensitive and OutputStyleHeader makes the following call: request.getHeader("User-Agent") should be replaced with: request.getHeader("user-agent")
          Hide
          Mircea Toma added a comment -

          Wow, you would be lead to believe, by the number of comments, that this bug was really difficult to fix.

          Show
          Mircea Toma added a comment - Wow, you would be lead to believe, by the number of comments, that this bug was really difficult to fix.
          Hide
          Adnan Durrani added a comment -

          ServletEnvironmentRequest has been fixed but component still need to be fixed.

          Show
          Adnan Durrani added a comment - ServletEnvironmentRequest has been fixed but component still need to be fixed.
          Hide
          Adnan Durrani added a comment -

          OutputStyle has been fixed as well. -revision 13516

          Show
          Adnan Durrani added a comment - OutputStyle has been fixed as well. -revision 13516

            People

            • Assignee:
              Unassigned
              Reporter:
              Frank Ye
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: