camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Mathers (JIRA)" <>
Subject [jira] Created: (CAMEL-2486) DefaultCamelContext throws NPE in start() for route with no destination
Date Thu, 18 Feb 2010 20:38:40 GMT
DefaultCamelContext throws NPE in start() for route with no destination

                 Key: CAMEL-2486
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.2.0
         Environment: Camel 2.2, Linux, Java 6
            Reporter: Michael Mathers
            Priority: Minor

Not easy to track down when you have a lot of routes.  This might be new with the introduction
of StartupRouteHolder (I think that was introduced in 2.2, right?)

public class TriggerNPETest extends CamelTestSupport {
	protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() {
            	// This will generate an NPE on DefaultCamelContext.start() (line 973)
            	// If this is an invalid route a proper message should be given far before 
            	// this and/or NPE should be tested on line 973
	public void testme() throws Exception {

	at org.apache.camel.impl.DefaultCamelContext.start(
	at org.apache.camel.test.junit4.CamelTestSupport.startCamelContext(
	at org.apache.camel.test.junit4.CamelTestSupport.setUp(

            // now start the inputs for all the route services as we have prepared Camel
            // yeah open the floods so messages can start flow into Camel
            for (Map.Entry<Integer, StartupRouteHolder> entry : inputs.entrySet()) {
                Integer order = entry.getKey();
                Route route = entry.getValue().getRoute();  //  <<<-------  Right

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

View raw message