Error when exceuted with new Version

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
nivedeeta

Error when exceuted with new Version

Post by nivedeeta » Thu Oct 24, 2002 12:08 pm

Hi

I had written a program to display chart in servlet/jsp environment along with tooltip.

Everything works fine with older release.

When i replace the files with new 0.9.4 version and try to run the example i get following error :

java.lang.IllegalAccessError: try to access field com.jrefinery.chart.AbstractRenderer.info from class com.jrefinery.chart.demo.servlet.SingleSeriesMultipleColorHorizontalBarRenderer
at com.jrefinery.chart.demo.servlet.SingleSeriesMultipleColorHorizontalBarRenderer.drawCategoryItem(SingleSeriesMultipleColorHorizontalBarRenderer.java:182)
at com.jrefinery.chart.HorizontalCategoryPlot.render(Unknown Source)
at com.jrefinery.chart.HorizontalCategoryPlot.draw(Unknown Source)
at com.jrefinery.chart.JFreeChart.draw(Unknown Source)
at com.jrefinery.chart.JFreeChart.createBufferedImage(Unknown Source)
at com.jrefinery.chart.ChartUtilities.writeChartAsPNG(Unknown Source)
at com.jrefinery.chart.ChartUtilities.saveChartAsPNG(Unknown Source)
at com.jrefinery.chart.ChartUtilities.saveChartAsPNG(Unknown Source)
at com.jrefinery.chart.servlet.ServletUtilities.saveChartAsPNG(Unknown Source)
at com.jrefinery.chart.demo.servlet.WebHitChart.generateStackedHorizontalBarChart(WebHitChart.java:300)


what may be the reason for this?

Regards,
Nivedeeta

Dave Gilbert

Re: Error when exceuted with new Version

Post by Dave Gilbert » Thu Oct 24, 2002 3:15 pm

The AbstractRenderer class keeps a local reference to the ChartRenderingInfo object. In 0.9.3 it was a protected attribute, now it is private. Subclasses will have to use getInfo() to access the attribute.

Similar changes have been made in many classes as I went through tidying up the code using a free utility called Checkstyle:

http://checkstyle.sourceforge.net/

Regards,

DG.

Locked