anoir (1) [Avatar] Offline
I know this question has been answered 100 times but I really don't know how to work with J2EE5 + Eclipse + GlassfishV2.1.1

I searched the forum and followed the example in
and has no problem

I tried the method in appendix E to use "ant" "ant run" to run the HelloWorld example with no problem..

but when I run the example in elipse, it always show

Exception in thread "main" java.lang.NullPointerException
at ejb3inaction.example.HelloUserClient.main(

if I change to use


in the bean class and use

HelloUser bean = (HelloUser) ctx.lookup("ejb/testJNDI");
bean.sayHello("Curious George");

to lookup, then it is ok

but i want to use @EJB annotation. I don't know how to setup to use it correctly because it always show NullPointerException, and the book keep telling me that how good annotation is.

After searching from goolge and this forum, I know I have to setup something called ACC for the client, but I have no idea what it is and how to set it up.
So.. please just tell me how to run the client. or at least tell me which part in the book shows how to setup the ACC and run the client

I believe 9 out of 10 beginner have this problem since so many people have asked.

Please help! many thanks

Message was edited by:

Message was edited by:

Message was edited by:

Message was edited by: