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

camel-blueprint - Using routeContextRef to refer to a RouteBuilder in another bundle causes ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.11.0
    • 2.10.7, 2.11.2, 2.12.0
    • camel-blueprint
    • None
    • Unknown

    Description

      See
      http://camel.465427.n5.nabble.com/Referencing-OSGi-services-with-RouteBuilder-classes-for-use-in-CamelContext-tp5734660.html

      I can reproduce with stacktrace

      Caused by: java.lang.ClassCastException: Proxyfdf03102_b8fa_4caf_b44c_fa565998bb6e cannot be cast to org.apache.camel.builder.RouteBuilder
      	at org.apache.camel.model.RouteBuilderDefinition.createRouteBuilder(RouteBuilderDefinition.java:64)
      	at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.installRoutes(AbstractCamelContextFactoryBean.java:727)
      	at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.setupRoutes(AbstractCamelContextFactoryBean.java:299)
      	at org.apache.camel.blueprint.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:300)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_25]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_25]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_25]
      	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_25]
      	at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.1.0]
      	at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.1.0]
      	at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[7:org.apache.aries.blueprint.core:1.1.0]
      	... 40 more
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: