camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Re: Issue with Camel Blueprint and EndpointInject
Date Mon, 17 Oct 2011 11:35:09 GMT
Done --> https://issues.apache.org/jira/browse/CAMEL-4552



On Mon, Oct 17, 2011 at 12:48 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> Hi Charles
>
> Can you create a JIRA ticket? There may be issues with @Produce and
> @Consume as well.
>
> You would need to add support for that in the camel-blueprint component.
> Like we do in camel-spring to support them by looking up in the Spring
> ApplicationContext.
>
>
> On Mon, Oct 17, 2011 at 12:05 PM, Charles Moulliard
> <cmoulliard@gmail.com> wrote:
>> Hi,
>>
>> Camel Blueprint does not like @EndpointInjection mechanism.
>>
>> The following syntax with Camel 2.8 generates the error
>>
>> public class NmrConsumerRoute extends RouteBuilder{
>>
>>  @EndpointInject(ref="nmrConsumer")
>>  private Endpoint demo1ConsumerUri ;
>>
>>  @Override
>>  public void configure() throws Exception {
>>   from("nmr:demo1").log("${in.body}");
>>  }
>>
>> }
>>
>> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>       xmlns:camel="http://camel.apache.org/schema/blueprint"
>>       xsi:schemaLocation="
>>       http://www.osgi.org/xmlns/blueprint/v1.0.0
>> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
>>       http://camel.apache.org/schema/blueprint
>> http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
>>
>>  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
>>     <endpoint id="nmrConsumer" uri="nmr:demo1"/>
>>  </camelContext>
>>
>> </blueprint>
>>
>>
>> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to
>> create route route8: Route[[From[no uri or ref supplied!]] ->
>> [Log[${in.body}]]] because of Either 'uri' or 'ref' must be specified
>> on: org.apache.camel.impl.DefaultRouteContext@2dac2cb7
>>        at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:170)
>>        at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:698)
>>        at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1660)
>>        at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1447)
>>        at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1339)
>>        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
>>        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
>>        at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1317)
>>        at org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:88)
>>        at org.apache.camel.blueprint.BlueprintCamelContext.init(BlueprintCamelContext.java:80)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_26]
>>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_26]
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_26]
>>        at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_26]
>>        at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)[10:org.apache.aries.blueprint:0.3.1]
>>        at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)[10:org.apache.aries.blueprint:0.3.1]
>>        at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)[10:org.apache.aries.blueprint:0.3.1]
>>        ... 24 more
>>
>> Regards,
>>
>> Charles Moulliard
>>
>> Apache Committer
>>
>> Blog : http://cmoulliard.blogspot.com
>> Twitter : http://twitter.com/cmoulliard
>> Linkedin : http://www.linkedin.com/in/charlesmoulliard
>> Skype: cmoulliard
>>
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Mime
View raw message