Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-7760

WELD-001409: Ambiguous dependencies for type CdiCamelContext

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.13.2
    • Fix Version/s: 2.16.0
    • Component/s: camel-cdi
    • Labels:
      None
    • Environment:

      JBOSS_HOME: "D:\wildfly-8.1.0.Final"
      JAVA: "D:\jdk1.8.0_11\bin\java"

    • Estimated Complexity:
      Unknown

      Description

      Trying to bootstrap camel in a @singleton @startup bean with enabled CDI leads to a deployment exception.

      Ambiguous dependencies for type CdiCamelContext with qualifiers @Default

      • org.apache.camel.cdi.internal.CamelContextBean@35921a07,
      • Managed Bean [class org.apache.camel.cdi.CdiCamelContext] with qualifiers [@Any @Default]

      The only way to workaround this, is to implement a custom Cdi-Extension to veto the bean in question.

      Here is a demo-app: https://github.com/myfear/CamelEE7/
      (including workaround)

      The deployment exception:
      https://gist.github.com/myfear/40bfc75c292dafa7ba64

      This should be solved in order to make it easier to use Camel on EE servers with CDI integration.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                myfear Markus Eisele
              • Votes:
                4 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: