aspose file tools*
The moose likes Servlets and the fly likes drawing chart through servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "drawing chart through servlets" Watch "drawing chart through servlets" New topic
Author

drawing chart through servlets

khushi paul
Greenhorn

Joined: Feb 08, 2005
Posts: 26
hi all,
i m trying to draw a piechart through servlet using the JFreechart package.
i have kept the required jar files in the required folder and set the classpath accordingly.the code gets complied without any error but when i run that it gives following error

javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext..................................................................................
root cause
java.lang.NoClassDefFoundError
at org.jfree.chart.ChartFactory.createPieChart(ChartFactory.java:205)
at chart.doGet(chart.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
...................................

can any body pls tell me what might be the problem??
Vijay Sharma
Ranch Hand

Joined: Feb 02, 2005
Posts: 32
hi khushi,
I think ur JVM is unable to find the class Definition.Just go through the code once again,B'coz JVM is not able to recognize the definition of the classes related to package.check the path of ur package,and once again check ur classpath.Might be ur code will work.


Vijay Sharma
khushi paul
Greenhorn

Joined: Feb 08, 2005
Posts: 26
hi john,
thanks for ur reply but its still not working
is there any other way to draw graphs using servlets?
pls sum body help...
Vijay Sharma
Ranch Hand

Joined: Feb 02, 2005
Posts: 32
Hi khushi,
I think go through this page might be u will get some help.B'coz i have never worked on this kind of Application,like drawing of Graphs though Servlets.
http://builder.com.com/5100-6370-5031703.html
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

root cause
java.lang.NoClassDefFoundError
at org.jfree.chart.ChartFactory.createPieChart(ChartFactory.java:205)


Your app can't find the classes.
Where did you put the jar file from jFree?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
khushi paul
Greenhorn

Joined: Feb 08, 2005
Posts: 26
hi ben,
as per the instructions given,i have put jfreechart-0.9.21.jar and jcommon-0.9.6.jar files in /usr/local/tomcat/common/lib directory and set the calss path accordingly.
pls help
regards
khushi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: drawing chart through servlets