jfreechart can not work correctly in web-based program

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
adder
Posts: 9
Joined: Thu Jul 01, 2004 4:43 am

jfreechart can not work correctly in web-based program

Post by adder » Thu Jul 01, 2004 9:03 am

jfreechart can not work correctly in web-based program in linux.

linux version:redhat 9.0
jfreechart version:0.9.20
web server:tomcat

i download jfreechart-sample.war ,and upzip it .then I configure a virtual directory in tomcat point to jfreechart-sample.
but when I access it using IE,it thrown a exception as follow

javax.servlet.ServletException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.pie_005fchart_jsp._jspService(pie_005fchart_jsp.java:151)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


root cause

java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:140)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
java.awt.Font.initializeFont(Font.java:303)
java.awt.Font.<init>(Font.java:339)
org.jfree.chart.plot.PiePlot.<clinit>(PiePlot.java:186)
org.jfree.chart.demo.servlet.WebHitChart.generatePieChart(WebHitChart.java:112)
org.apache.jsp.pie_005fchart_jsp._jspService(pie_005fchart_jsp.java:68)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

but when i do the same thing in windown 2000,it works well.

anybody can tell me the reason.thanks

nova
Posts: 17
Joined: Tue Jun 08, 2004 8:02 am

Post by nova » Thu Jul 01, 2004 10:41 am

Try to deploy the war with tomcat manager. Rest look at your other post :)

Locked