2 Replies Latest reply on Jul 13, 2010 11:44 PM by user Java

    JSF 2 Managed Beans with @Inject Annotation on JBoss 6

    user Java Newbie

      Hi,

       

        I am trying to use @Inject annotation to lookup my Service Class in my JSF2 Managed beans.

       

      But i am getting null pointer exception at (red line). Any idea to fix this?

       

       

      @ManagedBean(name="ABC")

      @SessionScoped

      public class A{

       

      @Inject private ServiceLocator locator;

       

      public String loadDetails(){

       

           String aa= locator.getXXX();

      }

      }

       

       

       

      Thanks,

      User