java.lang.NoSuchMethodError: org.jfree.data.time.TimeTableXY
java.lang.NoSuchMethodError: org.jfree.data.time.TimeTableXY
Hi,
I am new to JFreeChart and JCommon.
I have downloaded the latest version of jFreeChart, jfreechart-1.0.1.jar, and the latest version of jCommon, jcommon-1.0.3.jar; however, it seems that I am still getting an incompatibility problem during runtime.
I get the following error while running my application via tomcat and utilizing CeWolf to display the chart:
java.lang.NoSuchMethodError: org.jfree.data.time.TimeTableXYDataset.add(Lorg/jfree/data/time/RegularTimePeriod;DLjava/lang/String;)
The above error is incorrect, I have coded corretly with the appropriate number of arguments, but it seems that the runtime code has a different signature.
CAN ANYONE HELP!!!!!!!
thanks,
nasser
I am new to JFreeChart and JCommon.
I have downloaded the latest version of jFreeChart, jfreechart-1.0.1.jar, and the latest version of jCommon, jcommon-1.0.3.jar; however, it seems that I am still getting an incompatibility problem during runtime.
I get the following error while running my application via tomcat and utilizing CeWolf to display the chart:
java.lang.NoSuchMethodError: org.jfree.data.time.TimeTableXYDataset.add(Lorg/jfree/data/time/RegularTimePeriod;DLjava/lang/String;)
The above error is incorrect, I have coded corretly with the appropriate number of arguments, but it seems that the runtime code has a different signature.
CAN ANYONE HELP!!!!!!!
thanks,
nasser
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
That is odd. I would check that you don't have more than one version of the JFreeChart jar files on your classpath - sometimes that can lead to error messages that make no sense.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


java.lang.NoSuchMethodError: org.jfree.data.time.TimeTableXY
there is only that one jar file...nothing else.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Can you post the code that throws the exception? It may not help, but it won't hurt.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


code
private TimeTableXYDataset createTimeTable(TimeTableXYDataset objTimeTable,
String strName, String strScaleFactor, List objListData) throws Exception {
Iterator objItData = objListData.iterator();
while(objItData.hasNext()) {
DATA objData = (DATA)objItData.next();
Date objDate = objData.getDate();
Object objValue = objData.getValue();
if(SCALE_FACTOR_MONTHLY.equals(strScaleFactor)) {
objTimeTable.add(new Month(objDate), ((Double)objValue).doubleValue(), strName);
System.out.println("TIMETABLE_MONTHLY====>>>> objDate=" + objDate + "; objValue=" + objValue);
}
else if(SCALE_FACTOR_WEEKLY.equals(strScaleFactor)) {
objTimeTable.add(new Week(objDate), ((Double)objValue).doubleValue(), strName);
System.out.println("TIMETABLE_MONTHLY====>>>> objDate=" + objDate + "; objValue=" + objValue);
}
else if(SCALE_FACTOR_DAILY.equals(strScaleFactor)) {
objTimeTable.add(new Day(objDate), ((Double)objValue).doubleValue(), strName);
System.out.println("TIMETABLE_MONTHLY====>>>> objDate=" + objDate + "; objValue=" + objValue);
}
else if(SCALE_FACTOR_HOURLY.equals(strScaleFactor)) {
objTimeTable.add(new Hour(objDate), ((Double)objValue).doubleValue(), strName);
System.out.println("TIMETABLE_MONTHLY====>>>> objDate=" + objDate + "; objValue=" + objValue);
}
}
return objTimeTable;
}
String strName, String strScaleFactor, List objListData) throws Exception {
Iterator objItData = objListData.iterator();
while(objItData.hasNext()) {
DATA objData = (DATA)objItData.next();
Date objDate = objData.getDate();
Object objValue = objData.getValue();
if(SCALE_FACTOR_MONTHLY.equals(strScaleFactor)) {
objTimeTable.add(new Month(objDate), ((Double)objValue).doubleValue(), strName);
System.out.println("TIMETABLE_MONTHLY====>>>> objDate=" + objDate + "; objValue=" + objValue);
}
else if(SCALE_FACTOR_WEEKLY.equals(strScaleFactor)) {
objTimeTable.add(new Week(objDate), ((Double)objValue).doubleValue(), strName);
System.out.println("TIMETABLE_MONTHLY====>>>> objDate=" + objDate + "; objValue=" + objValue);
}
else if(SCALE_FACTOR_DAILY.equals(strScaleFactor)) {
objTimeTable.add(new Day(objDate), ((Double)objValue).doubleValue(), strName);
System.out.println("TIMETABLE_MONTHLY====>>>> objDate=" + objDate + "; objValue=" + objValue);
}
else if(SCALE_FACTOR_HOURLY.equals(strScaleFactor)) {
objTimeTable.add(new Hour(objDate), ((Double)objValue).doubleValue(), strName);
System.out.println("TIMETABLE_MONTHLY====>>>> objDate=" + objDate + "; objValue=" + objValue);
}
}
return objTimeTable;
}
-
- Posts: 13
- Joined: Fri Apr 28, 2006 2:53 pm
similar problem
I'm having a similar problem:
The actual call that throws the exeption is this:
Somehow, in the argument list, the three boolean arguments in the signature are being converted to "ZZZ"
wtf???
Code: Select all
java.lang.NoSuchMethodError: org.jfree.chart.ChartFactory.createBarChart(Ljava/lang/String; Ljava/lang/String;Ljava/lang/String; Lorg/jfree/data/category/CategoryDataset; Lorg/jfree/chart/plot/PlotOrientation;ZZZ) Lorg/jfree/chart/JFreeChart;
at org.jfree.chart.demo.servlet.BarChartJFreeChart.createBarChart(BarChartJFreeChart.java:99)
at org.jfree.chart.demo.servlet.BarChartJFreeChart.service(BarChartJFreeChart.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
etc...
Code: Select all
JFreeChart chart = ChartFactory.createBarChart(
"Chart Title",
null,
null,
catDataSet,
PlotOrientation.VERTICAL,
false,
false,
false
);
Code: Select all
createBarChart(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String; Lorg/jfree/data/category/CategoryDataset; Lorg/jfree/chart/plot/PlotOrientation;ZZZ) Lorg/jfree/chart/JFreeChart;
Last edited by socrateone on Mon May 01, 2006 10:14 pm, edited 1 time in total.
-
- Posts: 13
- Joined: Fri Apr 28, 2006 2:53 pm
one more thing...
I think an important thing to point out is that this error is in the catalina logs. There isn't any compile time error thrown. When I try to load the page with the chart in my web app, I get a blank page and that NoSuchMethodError is in the log files.
-
- Posts: 13
- Joined: Fri Apr 28, 2006 2:53 pm
found a fix for this
I still had the old lib files in my build directory. I needed to clean the build directory with an ant clean. That removed the old directory and the conflict.