I had this problem too, trying to get a RESTful web service to post a message to the JMS queue.
For me, I followed this guide here ( http://www.tricoder.net/blog/?p=128 ), and I needed to put the @Stateless over my public class... code.
For some reason (I don't know why, since I'm completely new to this), dependency requires @Stateless . (He says in the source above)
EDIT: Even so, when developing my application, I sometimes had a NullPointerException . Restarting Glassfish fixes the problem when this happens.
source share