You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Swee <ch...@yahoo.com> on 2015/05/12 04:51:08 UTC

2.15.1 -FailedToCreateRouteException : DataSource must be configured

Hi,

I am trying to configure the Camel sql component to read data from Oracle
DB.  The jdbc connection string used in the ApplicationContext.xml was
tested with java code and able to connect to OracleDB successfully. But I am
not sure why in Camel I am facing the following error. 

Please Help. Thanks in advance.

Best Regards,
Swee

Error:
org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
dbInputToEspRoute: Route(dbInputToEspRoute)[[From[sql:select ID, LOOKUP_ID,
LOO... because of Failed to resolve endpoint:
sql://select%20ID,%20LOOKUP_ID,%20LOOKUP_DESC%20FROM%20TEST_LOOKUP01%20where%20ESPREAD_FLAG%20=%200?consumer.onConsume=update+TEST_LOOKUP01+set+ESPREAD_FLAG+%3D+1+where+ID%3D+%3A%23id
due to: DataSource must be configured



content of the ApplicationContext.xml:
========================


        <bean id="dataSourceCDM" class="oracle.jdbc.pool.OracleDataSource">
		<property name="dataSourceName" value="mdev" />
		<property name="URL" value="jdbc:oracle:thin:@10.101.100.100:1521:aaa" />
		<property name="user" value="CDB" />
		<property name="password" value="CDB" />
	</bean>

	
	<bean id="sqlCDM" class="org.apache.camel.component.sql.SqlComponent">
		<property name="dataSource" ref="dataSourceCDM" />
	</bean>

<camelContext errorHandlerRef="deadLetterErrorHandler" id="espCamelContext"
xmlns="http://camel.apache.org/schema/spring">						

		<propertyPlaceholder id="properties" location="sql.properties" />
	
		<route id="dbInputToEspRoute" startupOrder="21">					
			<from
uri="sql:{{sql.selectTESTLookup}}?consumer.onConsume={{sql.updSelectedRec}}"/>				
		    					
			<split streaming="true">				
				<tokenize token="\n" group="1"></tokenize>			
				<convertBodyTo type="byte[]" />			
				<to uri=".........." />	
			</split>				
		</route>					
	</camelContext>	
	



--
View this message in context: http://camel.465427.n5.nabble.com/2-15-1-FailedToCreateRouteException-DataSource-must-be-configured-tp5766999.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: 2.15.1 -FailedToCreateRouteException : DataSource must be configured

Posted by Swee <ch...@yahoo.com>.
Yogesh,

thank you! it works now. 

Best Regards,
Swee Thai



--
View this message in context: http://camel.465427.n5.nabble.com/2-15-1-FailedToCreateRouteException-DataSource-must-be-configured-tp5766999p5767235.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: 2.15.1 -FailedToCreateRouteException : DataSource must be configured

Posted by yogu13 <yo...@gmail.com>.
try renaming bean id "sqlCDM" to "sql"

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/2-15-1-FailedToCreateRouteException-DataSource-must-be-configured-tp5766999p5767109.html
Sent from the Camel - Users mailing list archive at Nabble.com.