I was able to reproduce the issue and logged a ticket
https://issues.apache.org/jira/browse/CAMEL-6699

On Mon, Sep 2, 2013 at 1:19 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> Hi
>
> Do you have the stacktrace for this?
>
> Not sure why blueprint gives you the proxy class, could be that the
> osgi registry in camel-core-osgi should detect its a proxy class and
> get the target class automatic. But a stacktrace / or sample project
> to reproduce would be lovely to play with.
>
> On Mon, Jun 24, 2013 at 2:20 PM, Martin Stiborský
> <martin.stibor...@gmail.com> wrote:
>> Hello guys,
>> I'd like to ask first if I'm wrong or not...
>> I have a bundle, where is defined CamelContext in blueprint XML. In
>> this XML, I'd like to reference services from n other bundles, which
>> exposes services with routes - RouteBuilder class(es).
>>
>> How should be the route class for the bundles exposed? Something like this 
>> (?):
>>
>> <bean id="myRoute" class="com.foo.MyRoute"/>
>> <service ref="myRoute" interface="org.apache.camel.RoutesBuilder"/>
>>
>> Then, in the "main" bundle, where is CamelContext defined, I can catch
>> the reference:
>>
>> <reference id="myRouteReference" component-name="myRoute"
>> interface="org.apache.camel.RoutesBuilder"/>
>>
>> The problem is, it kind of doesn't work for me :(
>> The service is exposed, the reference is not null, but class type is wrong:
>>
>> Caused by: org.apache.camel.NoSuchBeanException: Found bean:
>> avatarRoutes in BlueprintContainer:
>> org.apache.aries.blueprint.container.BlueprintContainerImpl@50a28
>> b65 of type: Proxybad2ac0c_5c42_4054_bf65_7566a287f4c8 expected type
>> was: class org.apache.camel.builder.RouteBuilder
>>
>> Camel 2.11 / Karaf 2.3.1
>> According this answer from Claus
>> (http://stackoverflow.com/a/13439844/805219) I guess the idea is
>> possible, just my implementation is wrong.
>>
>> --
>> S pozdravem / Best regards
>> Martin Stiborský
>>
>> Jabber: st...@njs.netlab.cz
>> Twitter: http://www.twitter.com/stibi
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cib...@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to