anoir (1) [Avatar] Offline
#1
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
http://www.webagesolutions.com/knowledgebase/javakb/jkb005/index.html
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(HelloUserClient.java:12)

if I change to use

@Stateless(mappedName="ejb/testJNDI")

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:
anoir

Message was edited by:
anoir

Message was edited by:
anoir

Message was edited by:
anoir