looks like the context for route and context where datasource is set are different and hence datasource is not found..
try setting the datasource first and pass the same camel context to your route builder regards, -Yogesh On Tuesday 31 May 2016, Yogesh Rao <yog...@gmail.com> wrote: > your datasiyrce is not configured.. can you make sure its working? > > regards, > -yogesh > > On Tuesday 31 May 2016, imranrazakhan [via Camel] < > ml-node+s465427n5783303...@n5.nabble.com > <javascript:_e(%7B%7D,'cvml','ml-node%2bs465427n5783303...@n5.nabble.com');>> > wrote: > >> Following main class >> >> Main main = new Main(); >> main.addRouteBuilder( new GetAccountStatusBulk() ); >> main.getOrCreateCamelContext().getComponent("sql", >> SqlComponent.class).setDataSource(setupDataSource()); >> main.run(args); >> >> Following change in roue >> >> .to("sql:select status from subscriber where mobilenumber in >> (:#in:mobilenumbers)") >> >> Error : >> Exception in thread "main" org.apache.camel.FailedToCreateRouteException: >> Failed to create route route1 at: >> Caused by: java.lang.IllegalArgumentException: DataSource must be >> configured >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://camel.465427.n5.nabble.com/camel-sql-SQL-IN-Query-issue-2-17-1-tp5783264p5783303.html >> To unsubscribe from camel-sql - SQL IN Query issue (2.17.1), click here >> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5783264&code=eW9ndTEzQGdtYWlsLmNvbXw1NzgzMjY0fC04ODQzODQxMjM=> >> . >> NAML >> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> > -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-SQL-IN-Query-issue-2-17-1-tp5783264p5783307.html Sent from the Camel - Users mailing list archive at Nabble.com.