2 Replies Latest reply on Mar 26, 2010 2:04 PM by 843793

    @Resource - NullPointerException

      Hi ,
      I am trying to lookup the Connection factory resource but I get a NullPointerException.I 'm running on JDK 6.0.

      Any ideas ?
      Do I need a deployment descriptor ?
      import javax.annotation.Resource;
      import javax.jms.QueueConnection;
      import javax.jms.QueueConnectionFactory;
      public class QueueSender {
           static QueueConnectionFactory qConnectionFactory;
            * @param args
           public static void main(String[] args) throws Exception {
                QueueConnection queueConnection = qConnectionFactory.createQueueConnection();
        • 1. Re: @Resource - NullPointerException
          Do you think the stacktrace of the NullPointerException is there just to annoy everyone, or do you think it contains possibly useful information - if not to you, then at least to someone trying to help you?

          Anyway this forum is about writing tools to process annotations, not so much about specific applications of those tools - so really your post is off topic, but I understand how you could be confused. A lot of forum descriptions could do with a significant makeover - including this one.

          The [JMS forum|http://forums.sun.com/forum.jspa?forumID=29] is more likely to yield a useful response to your post. I suggest you repost there.

          • 2. Re: @Resource - NullPointerException
            Thanks Bruce ...
            Not many will reply like you ... atleast for the link that you have provided :-)