camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-6699) camel-blueprint - Using routeContextRef to refer to a RouteBuilder in another bundle causes ClassCastException
Date Mon, 02 Sep 2013 14:30:52 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-6699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen updated CAMEL-6699:
-------------------------------

    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
{code}
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
{code}

  was:
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}

    
> 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: 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
> {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

Mime
View raw message