3 Replies Latest reply on Feb 6, 2004 10:20 PM by Juha Lindfors


    nagulapati Newbie

      Hi All,

      Does anyone know how to deploy interface classes in JBoss? I am always getting a NoClassDefFoundError when deploying an EJB bean which uses a utility interface class.

      AdminWebService admin = new AdminServiceLocator();

      Here AdminWebService is my interface class and AdminServiceLocator is another utility class.

      While deploying the bean I am getting this error,

      [ObjectName: jboss.j2ee:jndiName=HelloWorld,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: java.lang.NoClassDefFoundError: AdminClient/AdminWebService]

      Any pointers?


        • 1. Re: NoClassDefFoundError
          Juha Lindfors Master

          How's your app and utility classes packaged?

          • 2. Re: NoClassDefFoundError
            nagulapati Newbie

            Hello Juha,

            I have packed the AdminClient package along with home, remote interfaces and bean class into a jar file(ofcourse along with deployment descriptors) and deployed it. I always get the "NoClassDefFoundError" when deploying the package.

            Everything works fine if I change the "AdminWebService" to a class instead of an interface class. So I made the conclusion that the interface classes are not being picked up by the classloaders.

            Is "NoClassDefFoundError" exception caused only when classloader cannot find the specified class or it can be any other reason?


            • 3. Re: NoClassDefFoundError
              Juha Lindfors Master

              The classloaders do pick up interfaces, there's a problem in your packaging I think. Either the package declaration in your interface Java source is incorrect or it is being put in to an incorrect location when you create your JAR package.