title: Issue with Camel route! (Very Frustrated)
body: <p>I have the following route:</p>
  
  <pre><code>    &lt;!-- RC get projects --&gt;
  &lt;route id="sqlRCprojects"&gt;
      &lt;setBody&gt;
              &lt;constant&gt;SELECT [No_] FROM [navview].[dbo].[job] WHERE [Project Director] = 'RC';&lt;/constant&gt;
      &lt;/setBody&gt;
      &lt;to uri="jdbc:sql2005navview?readSize=0"/&gt;
      &lt;split&gt;
          &lt;tokenize token=","/&gt;
          &lt;setHeader headerName="project"&gt;
              &lt;javaScript&gt;request.body.substring(6, (""+request.body).length-1)&lt;/javaScript&gt;
              &lt;/setHeader&gt;
          &lt;to uri="activemq:queue:test.line"/&gt;
      &lt;/split&gt;
      &lt;to uri="mock:result"/&gt;
      &lt;/route&gt;
  </code></pre>
  
  <p>which uses this bean:</p>
  
  <pre><code>    &lt;bean id="sql2005navview" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
  &lt;property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/&gt;
  &lt;property name="url" value="jdbc:sqlserver://**.**:56395;databaseName=test" /&gt;
  &lt;property name="username" value="**" /&gt;
  &lt;property name="password" value="**" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>this fails with the following messages:</p>
  
  <pre><code>         INFO | Apache Camel 2.7.0 (CamelContext: camel) is shutdown in 0.009 seconds
  ERROR | Context initialization failed
  org.apache.camel.RuntimeCamelException: java.util.NoSuchElementException
          at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
          at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
          at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:238)
          at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
          at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
          at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
          at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
          at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
          at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
          at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:645)
          at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:200)
          at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:994)
          at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:588)
          at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:380)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
          at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
          at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
          at org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:338)
          at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:229)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
          at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
          at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
          at org.eclipse.jetty.server.Server.doStart(Server.java:242)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
          at org.apache.xbean.spring.context.ResourceXmlApplicationContext.&lt;init&gt;(ResourceXmlApplicationContext.java:64)
          at org.apache.xbean.spring.context.ResourceXmlApplicationContext.&lt;init&gt;(ResourceXmlApplicationContext.java:52)
          at org.apache.activemq.xbean.XBeanBrokerFactory$1.&lt;init&gt;(XBeanBrokerFactory.java:114)
          at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:114)
          at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:70)
          at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
          at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
          at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)
          at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
          at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
          at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
          at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
          at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
          at org.apache.activemq.console.Main.main(Main.java:107)
  Caused by: java.util.NoSuchElementException
          at java.util.AbstractList$Itr.next(AbstractList.java:350)
          at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1528)
          at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1440)
          at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1336)
          at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:164)
          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:1314)
          at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
          at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
          ... 60 more
   WARN | Failed startup of context WebAppContext@3b2ab74f@3b2ab74f/camel,file:/srv/apache-activemq-5.5.0/webapps/camel/
  org.apache.camel.RuntimeCamelException: java.util.NoSuchElementException
          at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
          at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
          at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:238)
          at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
          at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
          at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
          at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
          at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
          at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
          at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:645)
          at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:200)
          at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:994)
          at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:588)
          at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:380)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
          at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
          at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
          at org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:338)
          at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:229)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
          at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
          at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
          at org.eclipse.jetty.server.Server.doStart(Server.java:242)
          at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
          at org.apache.xbean.spring.context.ResourceXmlApplicationContext.&lt;init&gt;(ResourceXmlApplicationContext.java:64)
          at org.apache.xbean.spring.context.ResourceXmlApplicationContext.&lt;init&gt;(ResourceXmlApplicationContext.java:52)
          at org.apache.activemq.xbean.XBeanBrokerFactory$1.&lt;init&gt;(XBeanBrokerFactory.java:114)
          at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:114)
          at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:70)
          at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
          at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
          at org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)
          at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
          at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
          at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
          at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
          at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
          at org.apache.activemq.console.Main.main(Main.java:107)
  Caused by: java.util.NoSuchElementException
          at java.util.AbstractList$Itr.next(AbstractList.java:350)
          at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1528)
          at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1440)
          at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1336)
          at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:164)
          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:1314)
          at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
          at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
          ... 60 more
  </code></pre>