[ https://issues.apache.org/jira/browse/CAMEL-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-4077. -------------------------------- Resolution: Fixed > XML DSL - Validate <route> has a <from> on startup > -------------------------------------------------- > > Key: CAMEL-4077 > URL: https://issues.apache.org/jira/browse/CAMEL-4077 > Project: Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 2.7.2 > Reporter: Claus Ibsen > Assignee: Claus Ibsen > Priority: Minor > Fix For: 2.8.0 > > > We should add validation that a <route> has a <from> as input source. If > there is no such, you may get a stacktrace about no such element. > {code:xml} > <route> > <to uri="log:line"/> > <process ref="myProcessor"/> > <to uri="mock:line"/> > </route> > {code} > {code} > Caused by: java.util.NoSuchElementException > at java.util.AbstractList$Itr.next(AbstractList.java:350) > at > org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1524) > at > org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1436) > at > org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1326) > 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:1304) > at > org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:208) > at > org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101) > ... 29 more > {code} > The validation should be in camel-core so we ensure this is checked > regardless how the route definition has been created. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira