开发者

JavaEE 6: Can't compile @Resource(lookup="")

开发者 https://www.devze.com 2023-04-05 12:59 出处:网络
I am trying to use @Resource(lookup=\"\") to look up a resource configured in Glassfish 3.1. I am using Eclipse 3.5.

I am trying to use @Resource(lookup="") to look up a resource configured in Glassfish 3.1. I am using Eclipse 3.5.

I've set -Djava.endorsed.dirs=${GLASSFISH_HOME}/modules/endorsed and added javax开发者_StackOverflow中文版.annotation.jar to my projects build bath but still it doesn't compile.

I am not able to see the lookup parameter with @Resource.

Could someone help me understand why am I not getting the lookup parameter with @Resource?


Are you sure the javax.annotation.jar that you are using is the one for JavaEE6 (and not for a prior version), since lookup was introduced in JavaEE 6. Check the MANIFEST of that jar to confirm.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号