New to EJB world… Null pointer exception in EJB client
I am learning EJB and I am trying to execute the Helloworld example given in EJB In Action book. My app server is JBoss, I created the Jar file for the bean class and interface in the right directory( I can see the EJB in JMX console). Now I created a simple client using EJB annotations, but I am getting a NullPointerException. Here is my client code. Client code: package com.client; import javax.ejb.EJB; import com.EJB.*; public class HelloWorldClient { @EJB private static HelloWorldInterface HelloBean; public static void main(String[] args) { HelloBean.SayHelloWorldInEJB(); } } Bean class