• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

drawing chart through servlets

 
khushi paul
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
khushi paul
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
khushi paul
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic