camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Moulliard (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-4552) Blueprint does not like @EndpointInject
Date Mon, 17 Oct 2011 11:36:10 GMT
Blueprint does not like @EndpointInject
---------------------------------------

                 Key: CAMEL-4552
                 URL: https://issues.apache.org/jira/browse/CAMEL-4552
             Project: Camel
          Issue Type: Bug
          Components: camel-blueprint
            Reporter: Charles Moulliard


The following syntax with Camel 2.8 generates the error

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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message