More than 1 dependency injection is configured in 8M1

In my stateless ejb, I have

@Resource
TimerService timerService;

Sometimes 8M1 says "more than 1 dependency injection is configured for field timerService" when I do a "make project". Then I delete the @Resource, add it back again and I can make the project again!

4 comments
Comment actions Permalink

I've actually been seeing the same thing for @Autowired

The IDEA inspection will report that more than one candidates are wired for
this @Autowired annotation but there isn't. If you chose to see the list it
reports, it just brings you to the one candidate. Normally when I get this
error on @Autowired, IDEA will give me a list of the wired candidates which
then I can chose which to navigate to.

The way I've been able to get around it is to recreate my File Set for the
Spring facet but it is a bit of a pain. I also noticed it tends to happen
when I do make project as well.

-Grant


"Thai Dang Vu" <no_reply@jetbrains.com> wrote in message
news:10380298.47421219174022098.JavaMail.jive@app4.labs.intellij.net...

In my stateless ejb, I have

>

@Resource
TimerService timerService;

>

Sometimes 8M1 says "more than 1 dependency injection is configured for
field timerService" when I do a "make project". Then I delete the
@Resource, add it back again and I can make the project again!


0
Comment actions Permalink

http://www.jetbrains.net/jira/browse/IDEA-19240

"Grant Gochnauer" <grant@gochnauer.org> wrote in message
news:g8gqjn$1q7$1@is.intellij.net...

I've actually been seeing the same thing for @Autowired

>

The IDEA inspection will report that more than one candidates are wired
for this @Autowired annotation but there isn't. If you chose to see the
list it reports, it just brings you to the one candidate. Normally when I
get this error on @Autowired, IDEA will give me a list of the wired
candidates which then I can chose which to navigate to.

>

The way I've been able to get around it is to recreate my File Set for the
Spring facet but it is a bit of a pain. I also noticed it tends to happen
when I do make project as well.

>

-Grant

>
>

"Thai Dang Vu" <no_reply@jetbrains.com> wrote in message
news:10380298.47421219174022098.JavaMail.jive@app4.labs.intellij.net...

>> In my stateless ejb, I have
>>
>> @Resource
>> TimerService timerService;
>>
>> Sometimes 8M1 says "more than 1 dependency injection is configured for
>> field timerService" when I do a "make project". Then I delete the
>> @Resource, add it back again and I can make the project again!


0
Comment actions Permalink

I have same error message but different circumstances.

"More than one dependency injection is configured for field cacheService"

I have following annotation in my stateless ejb:

@EJB
public CacheService cacheService;

The error message is on cacheService field. This is javax.ejb.EJB annotation. When I change the annotation to @In (this is Seam annotation org.jboss.seam.annotations.In) which is similar the error disappears.

The error in this thread is supposed to be fixed already. I have 8.0 RC2 #9008. I don't know if this is a false positive or legitimite error.

So I would appreciate if somebody could judge that or explain what this inspection means. My application is working correctly on jboss. I have no runtime errors regarding this ejb.

0
Comment actions Permalink

I also have this identical error all over the place when validating EJB
injections. No runtime problems at all in jboss. I also thought it was
supposed to be fixed... I turn off validation.

erik

"Steve Hickson" <no_reply@jetbrains.com> wrote in message
news:18247740.72381225993966564.JavaMail.jive@app4.labs.intellij.net...
>I have same error message but different circumstances.
>

"More than one dependency injection is configured for field cacheService"

>

I have following annotation in my stateless ejb:

>

@EJB
public CacheService cacheService;

>

The error message is on cacheService field. This is javax.ejb.EJB
annotation. When I change the annotation to @In (this is Seam annotation
org.jboss.seam.annotations.In) which is similar the error disappears.

>

The error in this thread is supposed to be fixed already. I have 8.0 RC2
#9008. I don't know if this is a false positive or legitimite error.

>

So I would appreciate if somebody could judge that or explain what this
inspection means. My application is working correctly on jboss. I have no
runtime errors regarding this ejb.


0

Please sign in to leave a comment.