I have created a web application that implements Jfreechart in windows XP and it works fine. When i tried moving the whole application to a linux server i get the following error
http://www.nrel.colostate.edu/projects/agneb/error.html
I have moved the library files jcommon-0.8.5.jar and jfreechart-0.9.10.jar to the appropriate "lib" directory under tomcat webapps directory in the linux server
Is there anything i need to do to make the program work from linux. Its very crucial that it runs in linux. Any help will be grealy appreciated. Thanks
Below is the jsp code that implements jfree chart
<%@ page language="Java" import = "org.jfree.chart.plot.*,java.io.*,org.jfree.chart.*,org.jfree.chart.axis.ValueAxis,org.jfree.chart.axis.NumberAxis,org.jfree.chart.ChartUtilities,org.jfree.chart.ChartFactory,org.jfree.chart.JFreeChart,org.jfree.data.*,org.jfree.data.JDBCXYDataset,java.util.*,java.sql.*,paustian.nebraska.NebraskaConnection,java.net.URLEncoder,java.net.URLDecoder" %>
JFreeChart chart1 = ChartFactory.createLineXYChart("Management System A","Year","Soil C(T/ha) Relative to 1974",data1, PlotOrientation.VERTICAL,true,true,false);
XYPlot plot1 = chart1.getXYPlot();
ValueAxis y1axis = plot1.getRangeAxis();
JFreeChart chart2 = ChartFactory.createLineXYChart("Management System B","Year","Soil C(T/ha) Relative to 1974",data2, PlotOrientation.VERTICAL,true,true,false);
XYPlot plot2 = chart2.getXYPlot();
ValueAxis y2axis = plot2.getRangeAxis();
if (y1axis.getMaximumAxisValue() < y2axis.getMaximumAxisValue())
{
y1axis.setMaximumAxisValue(y2axis.getMaximumAxisValue());
}
else
y2axis.setMaximumAxisValue(y1axis.getMaximumAxisValue());
ChartUtilities.saveChartAsPNG(graph1,chart1, 600, 500);
ChartUtilities.saveChartAsPNG(graph2,chart2, 600, 500);
Class not found problem between different platforms
-
- Posts: 2
- Joined: Mon Aug 18, 2003 9:36 pm