1 Reply Latest reply on Aug 26, 2004 2:02 AM by Scott Stark

    Can JFreeChart be moved to "lib"?

    Mike Rooney Newbie

      I've seen a few posts in the forums related to the use of JFreeChart which is packaged within the console-mgr.sar. It seems to me that JFreeChart is making rapid advances in functionality that can be useful to applications deployed in JBoss. Having the jars packaged in the console requires either eliminating the console from the deployment or repackaging it with the version needed by the application. I've gotten NoClassDefFoundError and NoSuchMethodException when trying to use functionality added in later versions of JFreeChart.

      My suggestion is to move the JFreeChart jars to the "lib" directory in the JBoss distribution to make them easier to upgrade and more obvious to application developers that JBoss (or some of its components) requires these supporting libraries. I see Xalan, JGroups and other supporting libraries are installed in "lib". Does it make sense for JFreeChart to be installed there too?

      For those who are having trouble with NoClassDefFoundError and NoSuchMethodException, here is a piece of code I found useful to determine exactly which jar file the classloader is using to load a particular class:

       ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
       java.net.URL url = classLoader.getResource("org/jfree/chart/renderer/BarRenderer.class"); // Notice the slashes and .class extension