NoClassDefFoundError

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

NoClassDefFoundError

Post by Ravindra Nath » Mon Nov 18, 2002 2:26 pm

Please help me! :-)
I wrote a custom tag for Coldfusion using JFreeChart. It works fine on one Linux Machine with PJA, but fails on another Linux machine with PJA. The settings are the same. I have no idea where to start looking for errors.
I first thought that because of the NoClassDefFoundError the JFreeChart Libraries aren´t in the class path, but then I moved the ChartUtilities line in front of the createXYStepChart line and the ChartUtilities line causes no errror. Therefore it finds ChartUtilities what means the JFreeChart library must be in the classpath. :-((
The source throwing the error is:

private void createChart(XYDataset data, String title, String jpegFilePath, int width, int height) throws IOException {
ChartUtilities util = new ChartUtilities();
// create the linechart from the data
JFreeChart chart = ChartFactory.createXYStepChart(title, "Zeit",
"Euro", data, true); // THIS IS LINE 298

and the exception is:

java.lang.NoClassDefFoundError
at com.jrefinery.chart.ChartFactory.createXYStepChart(Unknown Source)
at de.a3technology.customtag.coldfusion.LineChart.createChart(LineChart.java:298)
at de.a3technology.customtag.coldfusion.LineChart.simpleAuction(LineChart.java:170)
at de.a3technology.customtag.coldfusion.LineChart.processRequest(LineChart.java:102)
at coldfusion.tagext.CfxTag.doStartTag(Unknown Source)
at coldfusion.runtime.CfJspPage._emptyTag(Unknown Source)
at cfactShowStatistic2ecfm1392446587.runPage(/home/wwwbau/live/htdocs/cf/bauforum/auction/admin/actShowStatistic.cfm:60)
at coldfusion.runtime.CfJspPage.invoke(Unknown Source)
at coldfusion.tagext.lang.IncludeTag.doStartTag(Unknown Source)
at coldfusion.runtime.CfJspPage._emptyTag(Unknown Source)
at cffbx_Switch2ecfm649282821.runPage(/home/wwwbau/live/htdocs/cf/bauforum/auction/admin/fbx_Switch.cfm:76)
at coldfusion.runtime.CfJspPage.invoke(Unknown Source)
at coldfusion.tagext.lang.IncludeTag.doStartTag(Unknown Source)
at coldfusion.runtime.CfJspPage._emptyTag(Unknown Source)
at cffbx_fusebox_FEX_CF502ecfm1576398730.runPage(/home/wwwbau/live/htdocs/cf/bauforum/fbx_fusebox_FEX_CF50.cfm:395)
at coldfusion.runtime.CfJspPage.invoke(Unknown Source)
at coldfusion.tagext.lang.IncludeTag.doStartTag(Unknown Source)
at coldfusion.runtime.CfJspPage._emptyTag(Unknown Source)
at cfindex2ecfm802893388.runPage(/home/wwwbau/live/htdocs/cf/bauforum/index.cfm:27)
at coldfusion.runtime.CfJspPage.invoke(Unknown Source)
at coldfusion.tagext.lang.IncludeTag.doStartTag(Unknown Source)
at coldfusion.filter.CfincludeFilter.invoke(Unknown Source)
at coldfusion.filter.ApplicationFilter.invoke(Unknown Source)
at coldfusion.filter.PathFilter.invoke(Unknown Source)
at coldfusion.filter.ExceptionFilter.invoke(Unknown Source)
at coldfusion.filter.BrowserDebugFilter.invoke(Unknown Source)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(Unknown Source)
at coldfusion.filter.BrowserFilter.invoke(Unknown Source)
at coldfusion.filter.GlobalsFilter.invoke(Unknown Source)
at coldfusion.filter.DatasourceFilter.invoke(Unknown Source)
at coldfusion.CfmServlet.service(Unknown Source)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:198)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Dave Gilbert

Re: NoClassDefFoundError

Post by Dave Gilbert » Mon Nov 18, 2002 11:18 pm

My guess is that there is a problem with the PJA installation. A good thing to try (if you can) is running JDK1.4 in 'headless' mode, though I guess if you are using PJA it means you don't have access to JDK1.4.

Regards,

DG

Ravindra Nath

Re: NoClassDefFoundError

Post by Ravindra Nath » Tue Nov 19, 2002 9:21 am

Hello

Right I can´t install JDK1.4 :-(
I think I found the problem. The first exception thrown after server restart is another (see bottom of message). It is just thrown once after restart, after then there are only the java.lang.NoClassDefFoundError Exceptions. I think that the exceptions occur because the RPM XFree86-libs isn´t installed on this system. I reproduced the error on my develop-system by renaming the file libXp.so.6
The problem is, that I can´t directly install the RPM. Is there a way to avoid installing anything? If not it is not that bad (I just have to tell someone to install the RPM), but I am generally interessted in this.

Thanks for your help

Ravindra Nath




-------------------- EXTRACT FROM EXCEPTION ---------------------------------------
11/18 15:43:37 error /opt/coldfusionmx/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
java.lang.UnsatisfiedLinkError: /opt/coldfusionmx/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1414)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1330)
at java.lang.Runtime.loadLibrary0(Runtime.java:744)
at java.lang.System.loadLibrary(System.java:815)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:48)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1065)
at java.awt.Toolkit.<clinit>(Toolkit.java:1086)
at java.awt.Color.<clinit>(Color.java:183)
at com.jrefinery.chart.ValueAxis.<clinit>(Unknown Source)
at com.jrefinery.chart.ChartFactory.createXYStepChart(Unknown Source)
at de.a3technology.customtag.coldfusion.LineChart.createChart(LineChart.java:298)
------------------------- END EXTRACT -------------------------------------------------

Locked