You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/09/02 15:35:52 UTC

[jira] [Created] (CAMEL-6699) camel-blueprint - Using routeContextRef to refer to a RouteBuilder in another bundle causes ClassCastException

Claus Ibsen created CAMEL-6699:
----------------------------------

             Summary: camel-blueprint - Using routeContextRef to refer to a RouteBuilder in another bundle causes ClassCastException
                 Key: CAMEL-6699
                 URL: https://issues.apache.org/jira/browse/CAMEL-6699
             Project: Camel
          Issue Type: Bug
          Components: camel-blueprint
    Affects Versions: 2.11.0
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 2.11.2, 2.12.0


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

I can reproduce with stacktrace
{code}
Caused by: org.apache.camel.NoSuchBeanException: Found bean: myHelloRoute in BlueprintContainer: org.apache.aries.blueprint.container.BlueprintContainerImpl@579af7c4 of type: Proxy5df2f7da_5391_48a9_aa07_8b493c81eeb2 expected type was: interface java.util.List
	at org.apache.camel.blueprint.BlueprintContainerRegistry.lookupByNameAndType(BlueprintContainerRegistry.java:69)
	at org.apache.camel.impl.CompositeRegistry.lookupByNameAndType(CompositeRegistry.java:52)
	at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookupByNameAndType(PropertyPlaceholderDelegateRegistry.java:63)
	at org.apache.camel.util.CamelContextHelper.lookup(CamelContextHelper.java:121)
	at org.apache.camel.model.RouteContextRefDefinitionHelper.lookupRoutes(RouteContextRefDefinitionHelper.java:64)
	at org.apache.camel.model.RouteContextRefDefinition.lookupRoutes(RouteContextRefDefinition.java:56)
	at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.initRouteRefs(AbstractCamelContextFactoryBean.java:497)
	at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.setupRoutes(AbstractCamelContextFactoryBean.java:286)
	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]
	... 41 more
Caused by: java.lang.ClassCastException: Cannot cast Proxy5df2f7da_5391_48a9_aa07_8b493c81eeb2 to java.util.List
	at java.lang.Class.cast(Class.java:3084)[:1.7.0_25]
	at org.apache.camel.blueprint.BlueprintContainerRegistry.lookupByNameAndType(BlueprintContainerRegistry.java:65)
	... 56 more
^C
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira