users@glassfish.java.net

Build error when using _at_Resource(lookup = "jms/ConnectionFactory")

From: <glassfish_at_javadesktop.org>
Date: Thu, 07 Oct 2010 17:16:07 PDT

I am trying to run through the JMS tutorials and it has been challenging getting some of these examples to run.

This issue shows up when I load the tut-install/examples/jms/clientsessionmdb example into Netbeans IDE. In the PublisherBean.java file there are two resource annotations that give the following errors on build:

symbol : method lookup()
location: @interface javax.annotation.Resource
    @Resource(lookup = "jms/ConnectionFactory")
...

ejb/src/java/sb/PublisherBean.java:49: cannot find symbol
symbol : method lookup()
location: @interface javax.annotation.Resource
    @Resource(lookup = "jms/Topic")
2 errors

I have seen this error on "lookup" before (in another project). But when I changed over to JDK 1.6 the issue went away. JDK 1.6 is specified in this project and javax.annotation.Resource is in my library files (rt.jar for the 1.6 JDK and javax.annotation.jar for Glassfish).

My guess is that some file in this project must be out of date, but I have not been able to identify it. Can anyone help me to determine what is wrong?

Thanks.
[Message sent by forum member 'wnorman']

http://forums.java.net/jive/thread.jspa?messageID=484584