Jump to content
We've recently updated our Privacy Statement, available here ×

Error plotting pie chart


jfl

Recommended Posts

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:

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.
java.lang.IllegalArgumentException: Null 'key' argument.
at org.jfree.data.DefaultKeyedValues.setValue(DefaultKeyedValues.java:225)
at org.jfree.data.general.DefaultPieDataset.setValue(DefaultPieDataset.java:187)
at net.sf.jasperreports.charts.fill.JRFillPieDataset.customIncrement(JRFillPieDataset.java:126)
at net.sf.jasperreports.engine.fill.JRFillElementDataset.increment(JRFillElementDataset.java:144)
at net.sf.jasperreports.engine.fill.JRFillChartDataset.getDataset(JRFillChartDataset.java:57)
at net.sf.jasperreports.engine.fill.JRFillChart.evaluatePie3DImage(JRFillChart.java:1056)
at net.sf.jasperreports.engine.fill.JRFillChart.evaluateImage(JRFillChart.java:586)
at net.sf.jasperreports.engine.fill.JRFillChart.evaluate(JRFillChart.java:546)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:277)
(...)

 

My jrxml file is located at http://svn.sourceforge.net/viewvc/*checkout*/isak/isakstats/jasperreports/iSAKGlobal.jrxml?revision=16

.

 

I'm using a scriptlet and chart customizer class that can be found at http://svn.sourceforge.net/viewvc/isak/isakje/src/com/savoirfairelinux/isak/reports/

(source) and http://svn.sourceforge.net/viewvc/isak/isakje/dist/

(jar).

 

The error seems to appear when I use the subdataset in the pie chart otherwise it's okay.

 

Thanks for your help!

 

Jean-Francois

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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>

 

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.

 

HTH,

Lucian

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...