4 Replies Latest reply on Jun 16, 2011 5:13 AM by Kirill Linnik

    EJB3-JSF2 conflict in JBoss5

    Kirill Linnik Newbie

      Hi all,


      After vacations I've continued migrating application to JSF2 platform, but based on JBoss5 server (I've got too many issues with JBoss6, so I've started to hate it ).


      And it seems to me I found the bug: EJB3 is incompatible (don't ask me why) with JSF2.


      Here is my path: I have working application based on JSF1.2. In Eclipse I change it to JSF2.0, put new libraries in WEB-INF/lib catalogue, add two new properties in web.xml:

        <!-- JSF 2: this tells JBoss 5 to use the jsf jars included in the app -->     
        <!-- JSF 2: this needs to be included to avoid an error message -->


      Application compiles fine, started with no errors, EJB is binded:

      11:40:04,766 INFO  [SessionSpecContainer] Starting jboss.j2ee:ear=MyApplication.ear,jar=MyBusiness.jar,name=SomeDAOImpl,service=EJB3
      11:40:04,766 INFO  [EJBContainer] STARTED EJB: my.path.SomeDAOImpl ejbName: SomeDAOImpl
      11:40:04,779 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
           MyApplication/SomeDAOImpl/local - EJB3.x Default Local Business Interface
           MyApplication/SomeDAOImpl/local-my.path.SomeDAO - EJB3.x Local Business Interface


        @EJB(beanName="SomeDAOImpl/local", beanInterface=SomeDAO.class)
        protected SomeDAO someDao;

      is not injected. someDao is null.


      EJB is located in another jar and maybe this is causing the issue, but if I change JSF2.0 back to JSF1.2 - verything is working fine.


      So where is the catch?