2 Replies Latest reply on Dec 24, 2003 3:22 AM by bul

    ClassNotFoundException

    bul

      I'm using JBoss 3.2.2. I'm trying to get TestLoadClass by it's name. TestLoadClass is a public final class that extends Object. It has public consructor without any parameters. It hasn't any static fields or code.
      I have the following code:
      <
      Class.forName("com.fortpoint.darwin.model.TestLoadClass");
      >

      When I execute this code in plain java application then all works fine. But when I execute this code in jboss application then
      ClassNotFoundException occurs.
      How could we fix this? May be jboss has any config options?

        • 1. Re: ClassNotFoundException
          raja05

          Try
          Thread.currentThread.getContextClassLoader().loadClass(".....")

          • 2. Re: ClassNotFoundException
            bul

            Thanks, but this doesn't work also.

            The problem has been resolved. This class was used from an ejb module but is located in a web module. Placing this class in a jar shared by the ejb and the web module solves this problem.