Hi,
I have just started
EJB.
I am trying to run sample examples.
While running I am getting NullPointerException.
Do I missing anything?
I am using Eclipse JEE .
following are code files:
package ejb3inaction.example;
import javax.ejb.Stateless;
@Stateless
public class HelloUserBean implements HelloUser {
public void sayHello(
String name) {
System.out.println("Hello " + name + " welcome to EJB 3 In Action!");
}
}
package ejb3inaction.example;
import javax.ejb.Remote;
@Remote
public interface HelloUser {
public void sayHello(String name);
}
package ejb3inaction.example;
import javax.ejb.EJB;
import ejb3inaction.example.HelloUser;
public class HelloUserClient {
@EJB
private static HelloUser helloUser;
public static void main(String[] args) {
helloUser.sayHello("Curious George");
System.out.println("Invoked EJB successfully .. see server console for output");
}
}
Thanks in advance !
-- Pratik.