2 Replies Latest reply on Jan 25, 2012 5:09 AM by msansm1

    problem while deploying : [EJB Reference: beanInterface...

    msansm1 Newbie

      Hello,

       

      I have been rewriting my EJBs for separating the remote EJBs and the DAO.

      My project is organized like this :

      ejbModule :

                - com.....ejb : remote beans

                - com.....ejb.dao : dao beans

      The problem concerns 2 classes, but the problem can be on other classes I think.

       

      FieldDefDao.java :

      @Stateless

      @LocalBean

      public class FieldDefDao extends Dao {

       

          public List<FieldDef> getSectionFieldDef(int sectionId) {

                ...

          }

       

      }

       

      SectionDao.java :

      @Stateless

      @LocalBean

      public class SectionDao extends Dao {

         

          @EJB

          FieldDefDao fieldDefDao;

       

          public List<Section> getProjectSections(int projectId) {

              ....

          }

         

          public List<Field> getFieldsWithValue(int sectionId, int jobId) {

              ....

          }

       

      }

       

      And the Dao.java :

      public abstract class Dao {

         

          @PersistenceContext

          EntityManager em;

         

          @Resource

          SessionContext ctx;

         

          <T> T find(Class<T> entity, int primaryKey) throws Error{       

                 ....

          }

       

      }

       

      So, I get this error while deploying, and after few research on the JBoss forums and the web, I didn't find a solution which is working...

      DEPLOYMENTS IN ERROR:

        Deployment "vfs:///home/jboss-6.0.0.Final/server/default/deploy/ARMv5_ear.ear" is in error due to the following reason(s): java.lang.RuntimeException: Could not resolve @EJB reference: [EJB Reference: beanInterface 'com.devoteam.armv4.ejb.dao.FieldDefDao', beanName 'null', mappedName 'null', lookupName 'null', owning unit 'ComponentDeploymentContext@1184520{org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.SectionDao}'] for environment entry: env/com.devoteam.armv4.ejb.dao.SectionDao/fieldDefDao in unit ComponentDeploymentContext@1184520{org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.SectionDao}

       

       

      If anyone has an idea, thanks.

       

      Ronan