1 Reply Latest reply on May 22, 2012 12:30 PM by Wolf-Dieter Fink

    Deploy EJB 3 in JBOSS as 7 outside an ear, dependences issue

    Alessandro D'Ottavio Newbie

      Hi guys

       

      i would like to deploy and EJB 3 project in JBoss as 7

      the project doesn't have an EAR file

       

      just the EJB project and another utility jar that contain implementation of the model used by the EJB and the interfaces implemented by the EJB

       

      so the structure is like this

       

      MyEjb

      MyBusiness

       

      to let to run the project i added

      1)in the  deployment assembly of the MyEjb project the dependence of the MyBusiness project

      2) in the mainifest of the MyEjb project i added the classpath required (the MyBusiness jar file)

       

      Manifest-Version: 1.0

      Class-Path: MyBusiness.jar

       

      after that i deployed the EJB

       

      the structure created in the deployment is this

       

      MyEjb

                --> it.xxxx.   (etc etc all the pakage and classes that are part of this project)

                --> META-INF

                                    --> ejb-jar.xml

                                    -->MANIFEST.MF

                --> MyBusiness.jar

       

      but during the deployment phase i get this linkage error:

       

      MyEjb that has the EJB implementation   it/elsag/bric/ejb/facade/BricControllerBean, don't see my interface it.elsag.bric.business.interfaces.IBricController

      that is contained in the MyBusiness.jar file

       

      is it an errore related to an incorrect configuration of the class loading  ? or i can not add other jar in a EJB project?

       

      thank for any help

       

       

      8:14:14,544 WARN  [org.jboss.modules] (MSC service thread 1-5) Failed to define class it.elsag.bric.ejb.facade.BricControllerBean in Module "deployment.BricEJB.jar:main" from Service Module Loader: java.lang.LinkageError: Failed to link it/elsag/bric/ejb/facade/BricControllerBean (Module "deployment.BricEJB.jar:main" from Service Module Loader)
           at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)
           at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)
           at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
           at org.jboss.modules.Module.loadModuleClass(Module.java:517)
           at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
           at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
           at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_31]
           at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_31]
           at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)
           at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:63) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
           at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
           at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
           at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
           at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]
           at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
      Caused by: java.lang.NoClassDefFoundError: it/elsag/bric/business/interfaces/IBricController
           at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_31]
           at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_31]
           at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_31]
           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_31]
           at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
           at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)
      
      Caused by: java.lang.ClassNotFoundException: it.elsag.bric.business.interfaces.IBricController from [Module "deployment.BricEJB.jar:main" from Service Module Loader]
           at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
           at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
           ... 26 more