PieChart Labels in a Servlet

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
TheHaas
Posts: 21
Joined: Sat Feb 07, 2004 9:14 pm
Contact:

PieChart Labels in a Servlet

Post by TheHaas » Wed Apr 14, 2004 10:06 pm

I'm running 0.9.17. I have the following in my code:

Code: Select all

PiePlot plot = (PiePlot) piechart.getPlot();
plot.setLabelGenerator( new StandardPieItemLabelGenerator("{0} - {2}"));
The above works fine when I render the chart in a ChartFrame, but if I do it in a servlet, I get an exception:

Code: Select all

javax.servlet.ServletException: org.jfree.chart.labels.StandardPieItemLabelGenerator.(Ljava/lang/String;)V
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
	at org.apache.jsp.JobStatusChart_jsp._jspService(JobStatusChart_jsp.java:175)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[yadda-yadda]
Anyone have any ideas?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Apr 16, 2004 10:45 am

Any chance that you have more than one jfreechart jar file on the classpath?
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked