From: Thomas K. <tk...@da...> - 2005-08-05 13:40:04
|
Hello everybody, I'm trying to use the excellent jfree project JFreeChart (http://www.jfree.org/jfreechart/index.php) to generate a few barcharts. Unfortunately I get an error and don't know whats wrong. Here's the code I use (as an example): <? java_require("jfreechart-1.0.0-rc1.jar"); $dataset = new Java("org.jfree.data.category.DefaultCategoryDataset"); print $dataset; print $dataset->hashCode(); ?> This is what I get: ----------------- snip --------------------------------------------- [class java.lang.String: First][class org.jfree.data.category.DefaultCategoryDataset: class org.jfree.data.category.DefaultCategoryDataset] Fatal error: Uncaught [class java.lang.Exception: java.lang.Exception: Invoke failed: [class org.jfree.data.category.DefaultCategoryDataset]->hashCode. Cause: java.lang.IllegalArgumentException: object is not an instance of declaring class] thrown in /mnt/data/var/www/localhost/htdocs/java.php on line 23 ----------------- snap --------------------------------------------- So apparantly, as to see in the first line, $dataset is indeed on object of the class DefaultCategorySet. But invoking a method on this object results in an error "object is not an instance of declaring class". What's wrong? Is this a bug in the bridge or did I do something wrong? Thanks Thomas |