servlet classnotfoundexception issue

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Dave Crane

servlet classnotfoundexception issue

Post by Dave Crane » Wed May 01, 2002 2:46 pm

Hi,

First off, thanks for the lovely graphs, guys! Very well-thought-out package, pleasant to use, good results, etc.

I'm using jfreechart with a servlet, getting data from a database and generating as an image on the fly every time. Typically, I'll pull out around 5000 data points (four series of 1200 each) and do a quick bit of arithmetic, then parcel it up as a Double[] for the jfreechart to use. I realise that this is lousy coding performance-wise, but as its only used for diagnostics by a very few users, I'm living with it for now. I will look into caching the image as and when.

Now and again, when I try to render the graph, I get nothing. If I view the servlet-generated image directly in a browser (i.e. not embedded in the web page), I see it is throwing a ClassNotFoundException, carping about the HorizontalCategoryAxis class.

I can verify that that class is on he claspath, and that the servlet contaner can see it, by running a very simple servlet that simply tries to resolve the class name and return a yes or no.

I'm using JDK1.3 on Red Hat Linux 6.2, with Apache tomcat 3.2.3 hooked onto apache web server, I'm running X on the box. Its a Piii-800MHz with 512MB ram, fairly light load usually. The jfreechart and jcommon libraries are sitting on the system classpath. The database is a recent version of MySQL (downloaded a couple of months ago to replace an ageing proprietary beast!), with the mm.mysql JDBC drivers. I have been having this problem with jfreechart-0.7.8 and jcommon-0.5.6, but have downloaded the latest today in case it makes a difference.

I don't think there is anything wrong with the jfreechart libraries or my use of them - looks like a tomcat server issue. However, I have had this particular tomcat up on the same box for over a year (henve all the somewhat out-of-date version numbers), and seen no problems until I introduced the dynamic graph images and jfreechart library, so I'm posting here in case anyone else has come up with similar problems or, better yet, fixes!!

Thanks, all,


Dave Crane

David Gilbert

Re: servlet classnotfoundexception issue

Post by David Gilbert » Fri May 03, 2002 10:46 am

Usually when I see a ClassNotFoundException I consider the named class (HorizontalCategoryAxis) and also any classes that class might be trying to use, since I've once or twice seen some misleading error messages. Unfortunately that doesn't suggest any likely culprits in this case. Strange...

DG.

Locked