1 Reply Latest reply on Apr 19, 2010 8:39 AM by treimy

    EJB dependency : NoClassDefFoundError

    bgonline

      Hello,

      I have an EJB that makes reference to a Class packaged in a commons.jar package.
      I have put this commons package at the root of the ejb-jar file, and I have referenced it in my META-INF/MANIFEST.MF file as :

      Class-Path: commons-1.0.jar
      

      But when I start JBoss, and that it tries to deploy my EJB, I have a NoClassDefFoundError. If I put my package in the lib directory of my AS, it works.

      How have I got to do ?

      Thanks in advance.
      _____________________ _ _ _
      bgOnline

        • 1. Re: EJB dependency : NoClassDefFoundError

          Hello,

           

          I have the same problem.

           

          In my ear. File is an EJB Project (bla.jar)

           

          the structure from the bla.jar file is:

           

          bla.jar

             -de/some/classes...

             -lib

                 -- jar1.jar

                 -- jar2.jar

                 -- jar3.jar

             -META_INF

                 --MANIFEST.MF

           

          The MANIFEST.MF:

           

          Manifest-Version: 1.0
          Ant-Version: Apache Ant 1.8.0
          Created-By: 1.6.0_19-b04 (Sun Microsystems Inc.)
          Class-Path: lib/jar1.jar lib/jar2.jar lib/jar3.jar

           

           

          When I call a EJB-Method from my Web-App which is also in the ear-file I will get a NoClassDefFoundError

          I am using JBoss 5.1.

           

          Thanks in advance!