-
1. Re: Failure: @Resource injection into JSF-managed-bean
ovesper Aug 22, 2011 1:00 PM (in response to ovesper)One interesting point is the different "id" for the two class-objects (926 vs. 23818). Could this be the reason for the issue? Am I having a class-loading-problem or something releated?
There is another weird thing to mention: the annotation @Resource is located within two jars:
- rt.jar from the Java Runtime
- jboss-annotations-api_1.1_spec.jar
Both classes have the same package-name (javax.annotation), but the jboss-class contains 1 more method (String lookup()). Could this cause the exceptions I'm currently facing? If yes, how am I supposed to force the usage of the correct class (whichever it may be)?
Another information: in contrast to the not working @Resource-injection, the injection of EJBs using @EJB works absolutely fine.
Thanks in advance.
-Oliver
-
2. Re: Failure: @Resource injection into JSF-managed-bean
ovesper Aug 24, 2011 12:52 AM (in response to ovesper)Is there anybody who's got my scenario (@Resource injection into a JSF managed bean) working with JBoss 6.0 or 6.1?
-
3. Re: Failure: @Resource injection into JSF-managed-bean
jaikiran Aug 24, 2011 1:06 AM (in response to ovesper)Are you packaging any jar file(s) containing javax.annotation.* classes within your application? If yes, remove such jar file(s) from the application packaging.
-
4. Re: Failure: @Resource injection into JSF-managed-bean
ovesper Aug 24, 2011 1:39 AM (in response to jaikiran)OMG... now I feel somewhat ashamed... I actually did package common-annotation.jar with my application. I couldn't remember but always thought I was just packaging richfaces-jar files. As the jar's where NOT added to the project's buildpath I didn't locate them in eclipse when looking for jar files exposing the javax.annotation.Resource class.
Thank you very much jaikiran, I really appreciate your help!
-Oliver