Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-3592

"NoSuchBeanException: No bean could be found in the registry for: ..." when deploying multiple SwitchYard applications with Camel services

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • jboss-fuse-6.0
    • jboss-fuse-6.0
    • Camel, SwitchYard
    • None
    • % %
    • Hide

      Use the attached reproducer switchyard-quickstart-camel-service.jar to switchyard-quickstart-camel-service5.jar. Make sure to use FSW 6.0 with FSW_6.0_2_2014 or later to reproduce it. Sometimes only two jars are enough to reproduce it, but using 5 jars makes reproducing it more certain.

      1. Log into the Management Console and add the following jars:

      • switchyard-quickstart-camel-service.jar
      • switchyard-quickstart-camel-service2.jar
      • switchyard-quickstart-camel-service3.jar
      • switchyard-quickstart-camel-service4.jar
      • switchyard-quickstart-camel-service5.jar

      2. Enable the applications above in the following order:

      • switchyard-quickstart-camel-service2.jar
      • switchyard-quickstart-camel-service3.jar
      • switchyard-quickstart-camel-service4.jar
      • switchyard-quickstart-camel-service5.jar
      • switchyard-quickstart-camel-service.jar

      3. Do a HTTP GET against the following urls:

      Show
      Use the attached reproducer switchyard-quickstart-camel-service.jar to switchyard-quickstart-camel-service5.jar. Make sure to use FSW 6.0 with FSW_6.0_2_2014 or later to reproduce it. Sometimes only two jars are enough to reproduce it, but using 5 jars makes reproducing it more certain. 1. Log into the Management Console and add the following jars: switchyard-quickstart-camel-service.jar switchyard-quickstart-camel-service2.jar switchyard-quickstart-camel-service3.jar switchyard-quickstart-camel-service4.jar switchyard-quickstart-camel-service5.jar 2. Enable the applications above in the following order: switchyard-quickstart-camel-service2.jar switchyard-quickstart-camel-service3.jar switchyard-quickstart-camel-service4.jar switchyard-quickstart-camel-service5.jar switchyard-quickstart-camel-service.jar 3. Do a HTTP GET against the following urls: http://localhost:8080/rest1 http://localhost:8080/rest2 http://localhost:8080/rest3 http://localhost:8080/rest4 http://localhost:8080/rest5

      When several SwitchYard applications that contain a Camel service, each referring to a different CDI bean (<to uri="bean:cdiBeanX"/>) in the Camel route, are deployed at the same time via the Management Console, and then are invoked in parallel, some of them frequently fail with the following error:

      13:18:49,408 WARN  [org.apache.camel.util.ObjectHelper] (http-/127.0.0.1:8080-1) Cannot find class: cdiBean2
      13:18:49,410 ERROR [org.apache.camel.processor.DefaultErrorHandler] (http-/127.0.0.1:8080-1) Failed delivery for (MessageId: ID-rilke-local-57043-1436501829124-3-3 on ExchangeId: ID-rilke-local-57043-1436501829124-3-4). Exhausted after delivery attempt: 1 caught: org.apache.camel.NoSuchBeanException: No bean could be found in the registry for: cdiBean2: org.apache.camel.NoSuchBeanException: No bean could be found in the registry for: cdiBean2
      	at org.apache.camel.component.bean.RegistryBean.getBean(RegistryBean.java:87) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
      	at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:77) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
      	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
      	at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:67) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
      	at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:101) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
      	at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
      	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]
      	...
      

              tcunning@redhat.com Thomas Cunningham
              rhn-support-tasato Tadayoshi Sato
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: