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] [Commented] (CAMEL-6699) camel-blueprint - Using routeContextRef to refer to a RouteBuilder in another bundle causes ClassCastException
Date Mon, 02 Sep 2013 15:48:51 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-6699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13756140#comment-13756140
] 

Claus Ibsen commented on CAMEL-6699:
------------------------------------

Ah there was still a bug in camel-core-xml which I have fixed. Though it may be a common mistake
for end users to expose a route builder as osgi service using its class name, I made that
mistake at first. 
                
> 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.10.7, 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