Error plotting pie chart

Hi guys!

I try to execute a report on JasperIntelligence (bundled version) that is executing well on iReport 1.2.4 and 1.2.5. I receive this error:

Code:
<br />
org.springframework.webflow.ActionExecutionException: Exception thrown executing [AnnotatedAction@135dd72 targetAction = com.jaspersoft.jasperserver.war.action.ViewReportAction@15d7e8e, attributes = map[[empty]]] in state 'verifyData' of flow 'viewReportFlow'; nested exception is java.lang.IllegalArgumentException: Null 'key' argument.<br />
java.lang.IllegalArgumentException: Null 'key' argument.<br />
	at org.jfree.data.DefaultKeyedValues.setValue(DefaultKeyedValues.java:225)<br />
	at org.jfree.data.general.DefaultPieDataset.setValue(DefaultPieDataset.java:187)<br />
	at net.sf.jasperreports.charts.fill.JRFillPieDataset.customIncrement(JRFillPieDataset.java:126)<br />
	at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:144)<br />
	at net.sf.jasperreports.engine.fill.JRFillChartDataset.getDataset(JRFillChartDataset.java:57)<br />
	at net.sf.jasperreports.engine.fill.JRFillChart.evaluatePie3DImage(JRFillChart.java:1056)<br />
	at net.sf.jasperreports.engine.fill.JRFillChart.evaluateImage(JRFillChart.java:586)<br />
	at net.sf.jasperreports.engine.fill.JRFillChart.evaluate(JRFillChart.java:546)<br />
	at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:277)<br />
(...)<br />
</td></tr></tbody></table><br />
<br />
My jrxml file is located at <a href="http://svn.sourceforge.net/viewvc/*checkout*/isak/isakstats/jasperreports/iSAKGlobal.jrxml?revision=16" target="_blank">http://svn.sourceforge.net/viewvc/*checkout*/isak/isakstats/jasperreports/iSAKGlobal.jrxml?revision=16</a><br>.<br />
<br />
I'm using a scriptlet and chart customizer class that can be found at <a href="http://svn.sourceforge.net/viewvc/isak/isakje/src/com/savoirfairelinux/isak/reports/" target="_blank">http://svn.sourceforge.net/viewvc/isak/isakje/src/com/savoirfairelinux/isak/reports/</a><br> (source) and <a href="http://svn.sourceforge.net/viewvc/isak/isakje/dist/" target="_blank">http://svn.sourceforge.net/viewvc/isak/isakje/dist/</a><br> (jar). <br />
<br />
The error seems to appear when I use the subdataset in the pie chart otherwise it's okay.<br />
<br />
Thanks for your help!<br />
<br />
Jean-Francois
jfl's picture
jfl
59
Joined: Jul 18 2006 - 10:00pm
Last seen: 17 years 2 months ago

2 Answers:

Are you using the same data to fill the report in iReport and JasperIntelligence? The error is data-related, it's caused by a null key being passed to the pie dataset.

What I've also noticed in your report is this:
Code:
<parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression></td></tr></tbody></table><br />
<br />
Although I don't think this is related to the error you posted, you should never do this as the parameters map you pass to a subdataset or subreport will be altered and you don't want to do this to the master report's parameters map.<br />
<br />
HTH,<br />
Lucian
lucianc's picture
86899
Joined: Jul 17 2006 - 1:10am
Last seen: 5 hours 18 min ago
Hi!

I finally found the problem. You were right, it was the subdataset used for the chart.

The error was in the SQL query. I used the REPORT_LOCALE parameter and always did my tests with French language. If I don't set any locale value, I get the error. I've corrected the bug.

By the way, is there a way to set the report locale in the "on the fly mode" (i.e. not a scheduled or background report generation)?

Thanks for your help!

Jean-Francois
jfl's picture
jfl
59
Joined: Jul 18 2006 - 10:00pm
Last seen: 17 years 2 months ago
Feedback
randomness