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

jfreechart+ireport


niminhit1

Recommended Posts

hi,

 

im using jasper report for Jfreechart chart generation.and ireport is used for creating the template.

I had set the property for the chart in ireport for the key expression,value expression and label expression.

The jrxml created is compiled in my java code and is use dto generate graph.the datat source in my case is Java Beans.But while generating a simple report im getting an error as below.Could anyone ive some suggestions regarding this.

 

 

 

 

 

exception

 

javax.servlet.ServletException: Servlet execution threw an exception

 

 

root cause

 

java.lang.NoSuchMethodError: org.jfree.chart.ChartFactory.createPieChart(Ljava/lang/String;Lorg/jfree/data/general/PieDataset;ZZZ)Lorg/jfree/chart/JFreeChart;

net.sf.jasperreports.engine.fill.JRFillChart.evaluatePieImage(JRFillChart.java:1566)

net.sf.jasperreports.engine.fill.JRFillChart.evaluateImage(JRFillChart.java:748)

net.sf.jasperreports.engine.fill.JRFillChart.evaluate(JRFillChart.java:705)

net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:274)

net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:403)

net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummarySamePage(JRVerticalFiller.java:920)

net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:854)

net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:286)

net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:120)

net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:791)

net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:714)

net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89)

net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)

com.ustri.data.report.DisplayReport.displayReport(DisplayReport.java:77)

com.ustri.other.JasperReportsDailyStatus.report(JasperReportsDailyStatus.java:101)

com.ustri.other.DailyStatus.getData(DailyStatus.java:156)

com.ustri.SBI.action.SubmitAction.execute(SubmitAction.java:115)

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)

javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 

Thanks in advance

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi!

I'd say you are using the wrong version of the JFreeChart-jar ... probably an older one than JasperReports expects. It's missing the method

 

JFreeChart ChartFactory.createPieChart(String, PieDataset);

 

Which jar do you use?

 

Hope this helps,

Sebastian

Link to comment
Share on other sites

csbac wrote:

Hi!
JFreeChart ChartFactory.createPieChart(String, PieDataset);

 

Sorry, you're right ... I missed the three booleans ...

JFreeChart ChartFactory.createPieChart(String, PieDataset, boolean, boolean, boolean);

 

Sure you don't have an older version of jfreechart lying around in your tomcat installation?

 

Seb.

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...