Hi,
I have previously drawn simple pie charts. Now I'm trying to draw a stacked area chart. I get a java.lang.ExceptionInInitializerError caused by an java.util.MissingResourceException on locale en_US.
I've never worked with localisation in any way before. If a particular set is missing shouldn't the code revert to using some default values?
I did try to create a LocalizationBundle_en_US.properties file (copied LocalizationBundle.properties) but this didn't matter.
I'm using JFreeChart 0.0.16.
/Anders
[2004-01-21 11:34:47 CET] <WorkerThread2> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request:
com.webobjects.foundation.NSForwardException [java.lang.ExceptionInInitializerError] null
[2004-01-21 11:34:47 CET] <WorkerThread2> com.webobjects.foundation.NSForwardException for java.lang.ExceptionInInitializerError
at org.jfree.chart.ChartFactory.createXYAreaChart(ChartFactory.java:868)
at se.optimatika.wo5.chart.DefaultTableXYFactory.getChart(DefaultTableXYFactory.java:85)
at CpStdChart.getImageData(CpStdChart.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
...
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.jfree.chart.plot.LocalizationBundle, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:511)
at org.jfree.chart.plot.XYPlot.<clinit>(XYPlot.java:209)
... 40 more
LocalizationBundle
I'm Getting It Too
I'm getting the same error. I rebuild the JAR file to add a few minor convenience methods.
I am using Windows 2000
JDK 1.3.1_02
JFreeChart 0.9.16
JCommon 0.9.1
All old files have been removed from my classpath.
Michael
I am using Windows 2000
JDK 1.3.1_02
JFreeChart 0.9.16
JCommon 0.9.1
All old files have been removed from my classpath.
Michael
Problem Fixed
My Java editor wasn't including *.properties files in the final JAR build. Once I included these, my problem went away. So this was user error.
If you are rebuilding your jar, make sure these files are in it after you build it.
Michael
If you are rebuilding your jar, make sure these files are in it after you build it.
Michael
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
There is an Ant script in the distribution which will rebuild the jar files and automatically include the resource files.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

