camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Commented: (CAMEL-1205) @EndpointInject can not lookup bean if endpoint is defined directly as a consumer (from)
Date Mon, 29 Dec 2008 09:35:06 GMT


Claus Ibsen commented on CAMEL-1205:


java.lang.IllegalStateException: Failed to load ApplicationContext
	at org.springframework.test.context.TestContext.getApplicationContext(
	at org.springframework.test.context.TestContextManager.prepareTestInstance(
	at org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests.runBare(
	at com.intellij.rt.execution.junit.JUnitStarter.main(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at com.intellij.rt.execution.application.AppMain.main(
Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be found for: ref:file://target/antpathmatcher?consumer.recursive=true&filter=#myFilter,
please check your classpath contains the needed camel component jar.
	at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(
	at org.apache.camel.model.FromType.resolveEndpoint(
	at org.apache.camel.impl.DefaultRouteContext.getEndpoint(
	at org.apache.camel.model.RouteType.addRoutes(
	at org.apache.camel.model.RouteType.addRoutes(
	at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(
	at org.apache.camel.impl.DefaultCamelContext.doStart(
	at org.apache.camel.spring.SpringCamelContext.maybeDoStart(
	at org.apache.camel.spring.SpringCamelContext.doStart(
	at org.apache.camel.impl.ServiceSupport.start(
	at org.apache.camel.spring.SpringCamelContext.maybeStart(
	at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(
	at org.springframework.context.event.SimpleApplicationEventMulticaster$
	at org.springframework.core.task.SyncTaskExecutor.execute(
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(
	at org.springframework.test.context.TestContext.loadApplicationContext(
	at org.springframework.test.context.TestContext.getApplicationContext(
	... 21 more

> @EndpointInject can not lookup bean if endpoint is defined directly as a consumer (from)
> ----------------------------------------------------------------------------------------
>                 Key: CAMEL-1205
>                 URL:
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-spring
>    Affects Versions: 1.5.1, 2.0.0
>            Reporter: Claus Ibsen
>            Priority: Minor
> I was messing with camel-spring and routes using spring DSL
> I had this part of unit test code
> {code:java}
>     @EndpointInject(name = "myFileEndpoint")
>     protected Endpoint inputFile;
> {code}
> To lookup an endppoint with the given name *myFileEndpoint*
> But if I define it directly then it cannot be found
> {code:xml}
>         <route>
>             <from id="myFileEndpoint" uri="file://target/antpathmatcher?consumer.recursive=true&amp;filter=#myFilter"/>
>             <to uri="mock:result"/>
>         </route>
> {code}
> So I have to define it as a loose endpoint as:
> {code:xml}
>         <endpoint id="myFileEndpoint" uri="file://target/antpathmatcher?consumer.recursive=true&amp;filter=#myFilter"/>
>         <route>
>             <from ref="myFileEndpoint"/>
>             <to uri="mock:result"/>
>         </route>
> {code}

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message