[GLASSFISH-13455] Passing a value expression in composite component throws a NPE Created: 15/Sep/10  Updated: 16/Sep/10  Resolved: 16/Sep/10

Status: Resolved
Project: glassfish
Component/s: jsf
Affects Version/s: 3.1
Fix Version/s: not determined

Type: Bug Priority: Blocker
Reporter: arungupta Assignee: Ed Burns
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
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.



 Comments   
Comment by Ryan Lubke [ 15/Sep/10 ]

Passing to Ed.

Comment by Ed Burns [ 16/Sep/10 ]

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

Generated at Sun Aug 02 21:09:43 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.