2 Replies Latest reply on Feb 23, 2009 6:49 AM by horstl

    Migration of EJB3 to JBoss5 from JBoss4.2.2

    kkoster

      I am moving a number of EJB3 beans from JBoss 4.2.2 to JBoss 5.0.0. After making the annotation alterations (everything is being handled by annotation, no xml deployment descriptors), I repackaged everything in the same manner that I did under 4.2.2.

      The first thing that struck me was that it looks like the .ejb3 file extension is no longer recognized by the deployers. I altered the extension to .jar and re-deployed.

      I am now getting class not found errors from the deployment. My packaging contains jars of my core classes nested within the jar and a manifest referring to the jars

      e.g. (pseudo package)

      ejb3.jar
      META-INF
       MANIFEST.MF (w/Class-Path referring to core jars)
       ejb.classes
       lib
       core.jars
      


      Under 4.2.2 this deployed without an issue. However, it looks like 5.0.0 no longer recognizes the Class-Path or does not unbundle the jar file in the same fashion as 4.2.2.

      Is this the case? If it is, is there a workaround for this packaging scenario?

      Thanks,
      Karl

        • 1. Re: Migration of EJB3 to JBoss5 from JBoss4.2.2
          jaikiran

          So you have jars within a jar? Why not change ejb3.jar to ejb3.ear and deploy it? That way any jars under the .ear/lib will be by default available in classpath.

          • 2. Re: Migration of EJB3 to JBoss5 from JBoss4.2.2
            horstl

            hi kkoster,

            try to add the dependent libs in top level of ear, not inside of the ejb jar,
            see also the j2ee 5 spec EE 8.2 Library Support

            EE.8.2.6Example

            app1.ear:
             META-INF/application.xml
             ejb1.jarClass-Path: util.jar
             ejb2.jarClass-Path: util.jar
             util.jar
            


            then it schould work :-)

            what you can also try is to add the relavtive path to it lib/core.jar's