camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulliard <cmoulli...@gmail.com>
Subject No SuchEndpointException is raised when a route is defined for the following uri ("event://default") !!
Date Fri, 10 Oct 2008 14:15:28 GMT

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 : cmoulliard@xpectis.com
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.


Mime
View raw message