2 Replies Latest reply on Oct 15, 2003 2:03 AM by ioparra

    NoClassDefFoundError on Deployment of ear

    haytham

      Okay. I would really appreciate a clear answer to this issue. I have an application with one EJB (SLSB). This SLSB has one business method:
      public void createStudent(Student st) throws....

      All EJB files (Home, remote, bean) are under the package: my.package.ejb.

      I have my datatypes (value objects really) Student, under: my.otherpackage.datatypes.

      I have all this packaged in myEjb.jar in an ear file. When I deploy the ear I get a NoClassDefFoundError telling me it cannot find my/otherpackage/datatypes/Student. The class and package is in the ejb module's jar, myEjb.jar. I have the basic manifest, application.xml, etc files.

      From reading all around the forums here and elsewhere, everyone seems to advise putting the helper classes or other classes in the bean interfaces (value object, etc), in the JBoss classpath. Is there a clean elegant way to deploy these classes with my ear? When JBoss runs, it show that the classpath is set to the following:
      CLASSPATH: ;C:\j2sdk1.4.2\lib\tools.jar;D:\jboss-3.2.2RC2\bin\\run.jar

      I would really appreciate any help/ideas.

      Thanks..

        • 1. Re: NoClassDefFoundError on Deployment of ear
          montia

          Hi,

          I was wondering if you managed to find a way of making the helper classes accessible to the EJBs without including them in the EJB jar file.

          I have the same problem with my application. Unfortunately, the JBoss Tutorial does not cover helper classes and their deployment. So, I'm left guessing as to how I sould go about deploying my _other_ classes: those that are not servlets or EJBs.

          Thanks,
          Monica

          • 2. Re: NoClassDefFoundError on Deployment of ear
            ioparra

            Have you tried add a Class-Path: entry in your manifest.mf file of your ejb.jar? Is this manner, this jar will be in the ejb-jar's classpath.

            -Ivan