glassfish
  1. glassfish
  2. GLASSFISH-13455

Passing a value expression in composite component throws a NPE

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Incomplete
    • Affects Version/s: 3.1
    • Fix Version/s: not determined
    • Component/s: jsf
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      13,455

      Description

      Passing a value expression in composite component throws a NPE, static value works fine.

      Converted the following component:

      <p:columnChart
      value="#

      {chartBean.javaee6Trends}

      "
      var="t"
      xfield="#

      {t.tweeter}"
      titleX="#javaee6"
      titleY="Tweets"
      maxY="#{chartBean.maxY}"
      height="200px"
      width="300px"
      live="true"
      refreshInterval="#{chartBean.refreshInterval}">
      <p:chartSeries label="" value=" #{t.tweets}" />
      </p:columnChart>

      to

      <p:columnChart
      value="#{cc.attrs.trends}"
      var="t"
      xfield="#{t.tweeter}

      "
      titleX="#

      {cc.attrs.title}

      "
      titleY="Tweets"
      live="true"
      height="300px"
      width="600px"
      refreshInterval="#

      {chartBean.refreshInterval}

      ">
      <p:chartSeries label="" value=" #

      {t.tweets}

      " />
      </p:columnChart>

      and the using page has:

      <ez:columnChart
      trends="#

      {chartBean.glassFishTrends}

      "
      title="#glassfish"/>

      This throws the following NPE:

      WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /twitter-demo-
      1.0-SNAPSHOT, because request parameters have already been read, or ServletRequest.getReader() has
      already been called
      SEVERE: java.lang.NullPointerException
      SEVERE: at
      org.primefaces.component.chart.column.ColumnChartRenderer.encodePartially(ColumnChartRenderer.ja
      va:198)
      SEVERE: at
      org.primefaces.component.chart.column.ColumnChart.encodePartially(ColumnChart.java:140)
      SEVERE: at
      org.primefaces.application.PrimeFacesPhaseListener$2.invokeContextCallback(PrimeFacesPhaseListener.
      java:263)
      SEVERE: at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1301)
      SEVERE: at
      javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:673)
      SEVERE: at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1310)
      SEVERE: at
      javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:673)
      SEVERE: at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1310)
      SEVERE: at
      javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:673)
      SEVERE: at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1310)
      SEVERE: at
      javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:673)
      SEVERE: at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1310)
      SEVERE: at
      javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:673)
      SEVERE: at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1310)
      SEVERE: at
      javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:673)
      SEVERE: at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1310)
      SEVERE: at
      javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:673)
      SEVERE: at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:1310)
      SEVERE: at
      javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:673)
      SEVERE: at
      org.primefaces.application.PrimeFacesPhaseListener.handleAjaxRequest(PrimeFacesPhaseListener.java:1
      10)
      SEVERE: at
      org.primefaces.application.PrimeFacesPhaseListener.beforePhase(PrimeFacesPhaseListener.java:66)
      SEVERE: at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:224)
      SEVERE: at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:95)
      SEVERE: at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
      SEVERE: at javax.faces.webapp.FacesServlet.service(FacesServlet.java:335)
      SEVERE: at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1522)

      Not sure if this NPE is caused by JSF runtime or PrimeFaces widget library.

      This bug need to be fixed for the J1 keynote demo.

        Activity

        Hide
        Ryan Lubke added a comment -

        Passing to Ed.

        Show
        Ryan Lubke added a comment - Passing to Ed.
        Hide
        Ed Burns added a comment -

        Marking INVALID as this issue was due to a bug in primefaces.

        Show
        Ed Burns added a comment - Marking INVALID as this issue was due to a bug in primefaces.

          People

          • Assignee:
            Ed Burns
            Reporter:
            arungupta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: