0 Replies Latest reply on Jul 7, 2010 12:47 PM by user Java

    JSF 2 Junit test error when using @Inject

    user Java Newbie


        I am getting a null pointer exception for my Junit Testcases when i use @Injection to look up a service. What am i missing. JSF pages work fine but my JUnits fails pls help

      class ABC{
         @Inject AService svc;

         public String getName(){
            return svc.getSvcName();

      I am getting error in  return svc.getSvcName() when i run Junits.

      Any ideas to fix?