Details

      Description

      When picketlink-social jar is on classpath of a CDI application and one tries to inject built-in Principal bean like this:

      @Inject
      private Principal principal;

      the error message is

      Ambiguous dependencies for type Principal with qualifiers @Default
      Possible dependencies:
      Built-in Bean java.security.Principal with qualifiers @Default,
      Managed Bean class org.picketlink.social.standalone.fb.FacebookPrincipal with qualifiers @Any @Default

      Looks like FacebookPrincipal is not meant to be a CDI bean and is not injected anywhere else.

      Possible solutions:
      1. Exclude this class explicitly in beans.xml
      2. Annotate it as @Vetoed - same effect as above but a compile time dependency on CDI required.
      3. Pedro's idea: annotate it with custom @PicketLink qualifier.
      4. My recent idea: Since CDI is not used in this module at all, to replace CDI 1.0 beans.xml with CDI 1.1 version with bean-discovery-mode="annotated" or "none". I'm not sure how CDI 1.0 container behaves then. Probably will still scan the archive as beans.xml is present.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pcraveiro Pedro Igor Silva
                Reporter:
                marcin-caban Marcin Caban
                Involved:
                Pedro Igor Silva
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: