2 Replies Latest reply on Nov 6, 2002 4:58 PM by Michael Schoning

    class loader problem

    Michael Schoning Newbie

      I get a ClassNotFoundException when I try to instantiate a class in my application. I have an EAR file containing a war file containing my webappplication.
      In my WEB-INF/lib I have a number of jar files.

      My problem is when a servlet tries to load a class like this:

      Class controllerClass = Class.forName(controllerName);

      The controllerName contains a fully qualified name to a class that exists in my jar files ( I have double checked)

      Using the debugger I have verified that the current classloader has the path to my jar files.

      Is there anyone else that has experienced a problem like this and found a solution? I would not like to load my jar file where the system class loader can find it, as it is application specific classes in them.

      I have run the same code on both Tomcat and Websphere without problem, but not encapsulated in an EAR file so maybe that’s my problem, but at the same time I really would like to package my application in ear files, since I now will add EJB’s to them.

      I am running JBoss 3.0.3 with Jetty on W2K.

      Thanks, Michael