View Full Version : Problems when ran in Win XP

08-28-2002, 12:04 PM

When I tried to run the demo program on my WinXP (with SDK1.4), I've got the following exceptions:

Exception in thread "main" java.lang.NullPointerException
at java.util.Hashtable.put(Compiled Code)
at java.util.ListResourceBundle.loadLookup(Compiled Code)
at java.util.ListResourceBundle.handleGetObject(ListResourceBundle.java:131)
at java.util.ResourceBundle.getObject(Compiled Code)
at java.util.ResourceBundle.getString(ResourceBundle.java:295)
at com.jrefinery.report.JFreeReportInfo.<init>(JFreeReportInfo.java:62)
at com.jrefinery.report.JFreeReport.getInfo(JFreeReport.java:764)
at com.jrefinery.report.demo.JFreeReportDemo.<init>JFreeReportDemo.java:181)
at com.jrefinery.report.demo.JFreeReportDemo.mainJFreeReportDemo.java:514)

Please help.

Thanks a million (in advance).


Wee Lep

08-28-2002, 01:17 PM

it won't help much, but: this error should not happen! The code sequence where this error occures does not use a Hashtable (I used the sources of Version 1.4.02 of Suns JDK):

from java.util.ListResourceBundle:
* We lazily load the lookup hashtable. This function does the
* loading.
private synchronized void loadLookup() {
if (lookup != null)

Object[][] contents = getContents();
HashMap temp = new HashMap(contents.length);
for (int i = 0; i < contents.length; ++i) {
// key must be non-null String, value must be non-null
String key = (String) contents[i][0];
Object value = contents[i][1];
if (key == null || value == null) {
throw new NullPointerException();
temp.put(key, value);
lookup = temp;

So your stacktrace does not look familiar, and why is there debugging code (the ones with the linenumbers) mixed with non-debug versions within a single class?
So please post the contents of your classpath (using "echo %CLASSPATH%" in the console). We'll find a cure, it just may require some time ...

Have more fun,
said Thomas

08-28-2002, 02:12 PM
Hi Taqua,

Thanks a lot for the help...

Below is the contents of my %CLASSPATH%:

C:\Java\dev>java -classpath C:\java\dev\bin;
C:\java\dev\jfreereport\gnujaxp.jar MainApplicationWindow

I've tried to run the demo proggie on a Win2K machine.. and everything is perfect... :(

Thanks again for the help.

Wee Lep

08-28-2002, 03:09 PM

ok, there is no bug there. But have you set an environment variable called "Classpath"? Try the command "set" without any parameters from the console. If there is a line starting with "classpath=" I'll need this content too, as this is added to your classpath.

Next thing: please give me the java version you use by calling "java -version", this will return the java version used to execute the programm. If you have multiple versions of java installed, this can give a hint which real version is used by default.

Have more fun,
said Thomas