0 Replies Latest reply on Apr 28, 2002 6:42 PM by Nick Ganju

    Bug in class loader for tomcat 3.2 / jboss 2.4.4

    Nick Ganju Newbie

      I have defined a class that implements javax.servlet.http.HttpSessionBindingListener. An instance of this class is put in the HttpSession, and when the session times out, the valueUnbound() method on this object is called.

      The valueUnbound() method performs certain operations on an instance of class com.mixonic.data.CustomerData. When this code gets run, I get an exception, saying
      [ERROR,Default] java.lang.reflect.UndeclaredThrowableException:

      [ERROR,Default] java.lang.ClassNotFoundException: com.mixonic.data.CustomerData (no security manager: RMI class loader disabled)

      [ERROR,Default] <<no stack trace available>>


      It can't find the CustomerData class, even though I use this class without any errors in my servlets. This leads me to believe that the thread which is running valueUnbound() somehow has not loaded this class, even though other threads in the Tomcat engine have the class loaded because it can be used in my servlets.

      If I put a jar file with com.mixonic.data.CustomerData in the tomcat/lib directory, this error message goes away. But I'd like to just leave the class in my WEB-INF directory in my web app and not have to put it in tomcat/lib as well.

      Also, once this exception is thrown, no other sessions on the web app will ever time out. So the thread which is handling these timeouts doesn't have a try/catch around the valueUnbound() function call, and the exception thrown completely craps out the thread.

      Not sure if this is fixed in Jboss3.0. Looking forward to trying it out once it's released.