3 Replies Latest reply on Nov 8, 2005 7:59 AM by Darran Lofthouse

    can not load class

    Joern Newbie

      Hi,

      I dont know where i should post it, i dont think it is a beginner question.

      I have a servlet where i call some classes from a jar that is stored in jboss/server/lib. This jar contains also a class that loads another class with Thread.currentThread().getContextClassLoader().loadClass("MyClass"). This always fails and i get the exception:

      11:28:12,379 ERROR [[GenerateReport]] Servlet.service() for servlet GenerateReport threw exception
      java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRChartCustomizer
      at java.lang.ClassLoader.findBootstrapClass(Native Method)
      at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:727)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:284)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:282)

      I tried to put the class in the webapp directory, in the classpath, and many more! Why this class is never found? im really frustrated...

      Thanks

      Smilidon