eclipse-ee4j / eclipse-ee4j/jersey
Ambiguous dependencies for type OAuth1Provider
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
When I implement my own OAuth1Provider CDI complains with
```
org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type OAuth1Provider with qualifiers @Default
at injection point [UnbackedAnnotatedField] @Inject private org.glassfish.jersey.server.oauth1.internal.AccessTokenResource.provider
at org.glassfish.jersey.server.oauth1.internal.AccessTokenResource.provider(AccessTokenResource.java:0)
Possible dependencies:
- Managed Bean [class org.glassfish.jersey.server.oauth1.DefaultOAuth1Provider] with qualifiers [@Any @Default],
- Managed Bean [class ....OAuth1Provider_] with qualifiers [@Any @Default]
```
OAuth1Provider_ class is my own.
#### Affected Versions
[2.25]
Contributor guide
Research direction
Start at the OAuth1Provider injection point in AccessTokenResource.java and inspect how DefaultOAuth1Provider is registered. Reproduce the CDI deployment failure with Jersey 2.25 and the custom OAuth1Provider implementation described in the issue. Done means a custom provider can be used without the reported ambiguous dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100