This content has been marked as final. Show 3 replies
Since your client is a standalone application, the @EJB annotation is ignored. Hence the NPE.
And what to do with this NPE??
Try the following code:
InitialContext ctx = new InitialContext(); HelloRemote bin = (HelloRemote) ctx.lookup("HelloBean/remote");
It needs some exception handling.
Depending on the method of deployment the JNDI name may vary. Look in the JMX console -> JNDIView for the true name.