2 Replies Latest reply on Jun 17, 2011 6:11 PM by Piotr Nowicki

    LocalBean in JBoss 6 Remote cannot be resolved (@EJB)

    Piotr Nowicki Newbie



      I've got some problem with injecting a LocalBean EJB using @EJB annotation. In other words, this is my EJB:



      public class AnotherBean {


          public void testIt() {




      and this is my TestCase:



      public class PrintServiceTest {



          AnotherBean m;



          public static JavaArchive deploy() {

              JavaArchive ar = ShrinkWrap.create(JavaArchive.class, "whatever.jar")



              return ar;




          public void myTest() throws NamingException {




      Both exist in the same package.


      The deployment fails because of the unsatisfied injection dependencies:



      Deployment "vfs:///home/pedro/jboss-6.0.0.Final/server/default/deploy/test.war" is in error due to the following reason(s): java.lang.RuntimeException: Could not resolve @EJB reference: [EJB Reference: beanInterface 'pedro.test.service.AnotherBean', beanName 'null', mappedName 'null', lookupName 'null', owning unit 'AbstractVFSDeploymentContext@5866124{vfs:///home/pedro/jboss-6.0.0.Final/server/default/deploy/test.war}'] for environment entry: env/pedro.test.service.PrintServiceTest/m in unit AbstractVFSDeploymentContext@5866124{vfs:///home/pedro/jboss-6.0.0.Final/server/default/deploy/test.war}


      I use:

      arquillian-junit = 1.0.0.Alpha5

      arquillian-jbossas-remote-6 = 1.0.0.Alpha5

      jboss-as-client = 6.0.0.Final


      I read here that the LocalBean injection is supported in JBoss 6.0 Remote.


      Did I do something wrong or missed something?


      Thanks in advance!