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

WELD-001409: Ambiguous dependencies for type CdiCamelContext

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.13.2
    • 2.16.0
    • camel-cdi
    • None
    • JBOSS_HOME: "D:\wildfly-8.1.0.Final"
      JAVA: "D:\jdk1.8.0_11\bin\java"

    • 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

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

              Dates

                Created:
                Updated:
                Resolved: