Skip to main content

NPE when trying to invoke WS from appclient using @WebServiceRef

2 replies [Last post]
ejb3user
Offline
Joined: 2005-12-14

Hi
I am trying out a simple HelloWorld Web Service built using EJB 3.0 Stateless session bean . The WS deploys fine and I am able to test it from console.

Build b41

I created a simple Java Client that is using @WebServiceRef and the proxy classes generated using wsimport,and when I run the class using appclient.bat it is throws an NPE at a point where it is not able to inject the service into the client class.

Any known issues in the latest build or changes in the spec that needs modifications to the client ?

thanks
-ejb3user

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vijaysr
Offline
Joined: 2003-06-11

hzang's hint is very valid one.

You can also use the tests under glassfish/appserv-tests/devtests/webservice/ejb_annotations as a reference - all of these are JAXWS based EJB endpoints and these tests pass

hzhang_jn
Offline
Joined: 2005-07-22

Please check if your injected field/method has the "static" keyword.

We tightened the check for injections in the InjectionManager. So when an application client uses injection, the injected field/method must be declared as static. This is specified by the JavaEE5 spec.