5 Replies Latest reply on Jan 17, 2005 1:25 PM by Adam Paeth

    How Can I dynimicly load a Class in Session Bean (Stateless

    Kobye Novice

      I encounter a problem.
      I should dynimicly load classes in a EJB.
      I read xml file and parse it ,then I can get a class name---I have packaged the class and the xml file into the ejb's jar file.
      I can get the file as a inputStream by Class.getResourceAsInputStream.
      But later,when I load the class by Class.forname(className), the CalssNotFoundException is threw.
      I change classloader to Thread.currentThread().getContextClassLoader()
      ,but the same exception it threw.

      Can you give some advice or help?

      Thanks you.