We help IT Professionals succeed at work.

Need a step by step example for how to create and run an EJB remote client on Glassfish using its Application Client Container.

kevorkgt
kevorkgt asked
on
I am trying to create a simple J2EE Application using Glassfish container. I successfully created and deploy a simple Stateless Session Bean. I was able to successfully run the client remotely using the JNDI lookup and by adding appserv-rt.jar and j2ee.jar to the classpath. So, I'm sure that I did the server part correctly.  My problem is when I tried to run the client jar file using appclient, I got the following error message:
com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref ejb/Test@jndi: test.server.TestServer@null@test.server.TestServer@Session@null into class test.client.TestClient
Anybody know how to fix this error or any step by step example of how to create and run an eJB remote client on Glassfish using their ACC?
Comment
Watch Question

Commented:
Solved my problem. It seems when you used @EJB in the glassfish ACC, the field that are injected have to be a static field.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.