1 Reply Latest reply on Oct 24, 2012 1:55 AM by Stephen Coy

    CDI muliple Modules

    eagle1985 Newbie

      Hi @all


      I have a Problem with CDI. I can not inject a Klasse that is @Named with CDI if the class is in a different jar. In that Case I get a NullPointerException everytime i try to use the Variable that has the @Inject annotation.

      Anyone an Idea what to do?


      MyEarApp.ear looks like this:























      I try to call the Service from (App-Core.jar) in UI1 like this:


      private MyService service;


      as soon as I call a method in MyService I get the NPE.

      CDI within MyUI1.war works fine.


      And last here the Class MyService

      public class ProductServices implements Serializable {
           private static final long serialVersionUID = 1L;
           private List<Aircraft> aircrafts;
           private TblAcFacade acFacade;
           private Logger log;
           public List<Aircraft> getAircrafts() {
                return aircrafts;


      Anyone can help me out?


      Thanks in advance