This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 225556 - Bogus "Unresolved ambiguous dependency" for qualified dep
Summary: Bogus "Unresolved ambiguous dependency" for qualified dep
Alias: None
Product: javaee
Classification: Unclassified
Component: CDI (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Sergey Petrov
Depends on:
Reported: 2013-01-30 18:17 UTC by pekarna
Modified: 2014-07-16 01:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

Invalid Netbeans warning about unambiguous dependency (6.83 KB, image/png)
2013-10-24 07:50 UTC, xwinus

Note You need to log in before you can comment on or make changes to this bug.
Description pekarna 2013-01-30 18:17:10 UTC
I have 

    public class Settings { ... }

and in a managed bean (web app object) I have

    @Produces @FromApp Settings getSettings(){ ... }

But when I refer to it with

    @Inject @FromApp Settings settings;

NetBeans shows warning:

    "Unresolved ambiguous dependency found as result of typesafe resolution"

That's wrong, the reference is ok and works in the app.
Seems like NetBeans ignores the @FromApp qualifier.
Comment 1 pekarna 2013-01-30 18:17:23 UTC
Comment 2 Denis Anisimov 2013-01-31 09:18:39 UTC
Please provide FromApp declaration.
Comment 3 pekarna 2013-02-01 18:48:59 UTC
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;
import javax.inject.Qualifier;

public @interface FromApp {
Comment 4 xwinus 2013-10-24 07:48:26 UTC
Also injecting the into @SessionScoped CDI bean (after successful login) leads to this behavior, however, injecting a user principal should be ok according to the Java EE 6 Spec

My configuration: NB7.4 Final, Oracle JDK 7u40 64bit, JBoss AS7, Win7
Comment 5 xwinus 2013-10-24 07:50:19 UTC
Created attachment 141499 [details]
Invalid Netbeans warning about unambiguous dependency
Comment 6 Sergey Petrov 2014-03-21 14:35:27 UTC
Latest comments are for different issues,
I can't reproduce initial one with nb 8.0, or need sample code instead of some lines from the code. but 8.0 ark FromApp as wrong and it's a new issue.
Close as incomplete instead of fixed as I may miss smth, please provide sample project.
Comment 7 Sergey Petrov 2014-07-02 15:43:03 UTC
I can reproducew after fix
Comment 8 Sergey Petrov 2014-07-15 12:49:57 UTC
Comment 9 Quality Engineering 2014-07-16 01:44:44 UTC
Integrated into 'main-silver', will be available in build *201407160001* on (upload may still be in progress)

User: Sergey B. Petrov <>
Log: #225556 make usual qualifier more flexible, need cleanup later