Doug, camel-spring jar is well defined in my classpath !!
kr, Charles Doug Douglass-2 wrote: > > Charles, > > The event component[1] is for interacting with the Spring > ApplicationContext > event subsystem[2]. No where in your code are you starting a Spring > ApplicationContext so the subsystem is not available. > > Also, be sure you are including the camel-spring jar in your classpath. > > HTH, > Doug > > > [1] http://activemq.apache.org/camel/event.html > [2] > http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#context-functionality-events > > On Fri, Oct 10, 2008 at 8:15 AM, cmoulliard <[EMAIL PROTECTED]> wrote: > >> >> Hi, >> >> I have the following error generated when I launch camel. >> >> Here is the error : >> >> org.apache.camel.NoSuchEndpointException: No endpoint could be found for: >> event://default, please check your classpath contains the needed camel >> component jar. >> at >> >> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:54) >> at >> org.apache.camel.model.RouteType.resolveEndpoint(RouteType.java:99) >> at >> >> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106) >> at >> >> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112) >> at >> org.apache.camel.model.FromType.resolveEndpoint(FromType.java:73) >> at >> >> org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:81) >> at org.apache.camel.model.RouteType.addRoutes(RouteType.java:213) >> at org.apache.camel.model.RouteType.addRoutes(RouteType.java:89) >> at >> >> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:641) >> at >> >> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:633) >> at >> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47) >> at com.xpectis.test.CamelEvent.startCamel(CamelEvent.java:40) >> at com.xpectis.test.CamelEvent.main(CamelEvent.java:62) >> >> and the code : >> >> package com.xpectis.test; >> >> import org.apache.camel.CamelContext; >> import org.apache.camel.ProducerTemplate; >> import org.apache.camel.builder.RouteBuilder; >> import org.apache.camel.impl.DefaultCamelContext; >> import org.apache.commons.logging.Log; >> import org.apache.commons.logging.LogFactory; >> >> public class CamelEvent { >> >> private static final transient Log LOG = >> LogFactory.getLog(CamelEvent.class); >> >> protected CamelContext camelContext; >> >> protected Object expectedBody = "Hello there!"; >> protected String uri = "event:::default"; >> protected ProducerTemplate<?> template = null; >> >> public void startCamel() throws Exception { >> camelContext = new DefaultCamelContext(); >> >> camelContext.addRoutes(createRouteBuilder()); >> camelContext.start(); >> >> template = camelContext.createProducerTemplate(); >> template.sendBodyAndHeader(uri, expectedBody, "cheese", >> 123); >> } >> >> protected RouteBuilder createRouteBuilder() throws Exception { >> return new RouteBuilder() { >> @Override >> public void configure() throws Exception { >> from("event://default").to("stream:out"); >> } >> }; >> } >> >> /** >> * @param args >> */ >> public static void main(String[] args) { >> >> CamelEvent camelEvent = new CamelEvent(); >> try { >> camelEvent.startCamel(); >> } catch (Exception e) { >> e.printStackTrace(); >> } >> } >> >> } >> >> REMARK : the camel-spring jar is well defined in my maven dependency. >> >> Charles Moulliard >> >> ----- >> Enterprise Architect >> >> Xpectis >> 12, route d'Esch >> L-1470 Luxembourg >> >> Phone +352 25 10 70 470 >> Mobile +352 621 45 36 22 >> >> e-mail : [EMAIL PROTECTED] >> web site : www.xpectis.com www.xpectis.com >> My Blog : http://cmoulliard.blogspot.com/ >> http://cmoulliard.blogspot.com/ >> -- >> View this message in context: >> http://www.nabble.com/No-SuchEndpointException-is-raised-when-a-route-is-defined-for-the-following-uri-%28%22event%3A--default%22%29-%21%21-tp19918878s22882p19918878.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > ----- Enterprise Architect Xpectis 12, route d'Esch L-1470 Luxembourg Phone +352 25 10 70 470 Mobile +352 621 45 36 22 e-mail : [EMAIL PROTECTED] web site : www.xpectis.com www.xpectis.com My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ -- View this message in context: http://www.nabble.com/No-SuchEndpointException-is-raised-when-a-route-is-defined-for-the-following-uri-%28%22event%3A--default%22%29-%21%21-tp19918878s22882p20014092.html Sent from the Camel - Users mailing list archive at Nabble.com.
