Hi
Reading http://activemq.apache.org/camel/sql-component.html I cannot
understand where I have to set the dataSource. I got
SEVERE: Failed: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: sql:select username as userid from mdl_user due to:
java.lang.IllegalArgumentException: Property 'dataSource' is required
org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:
sql:select username as userid from mdl_user due to:
java.lang.IllegalArgumentException: Property 'dataSource' is required
with
<route>
<from uri="timer://pollTheDatabase?delay=10000" />
<setProperty propertyName="dataSource">
<constant>moodleDB</constant>
</setProperty>
<to uri="sql:select username as userid from mdl_user" />
</route>
and with
<route>
<from uri="timer://pollTheDatabase?delay=10000" />
<to uri="sql:select username as userid from
mdl_user?template.dataSource=moodleDB" />
</route>
where moodleDB is defined as
<bean id="moodleDB"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"
/>
<property name="url" value="jdbc:mysql://localhost:3306/moodle"
/>
<property name="username" value="moodle" />
<property name="password" value="moodle" />
</bean>
It would be nice to have an example for each camel component in "examples"
in the camel distribution...
Thanks in advance
Matteo
--
View this message in context:
http://www.nabble.com/Camel-SQL-Component---dataSource-property-tp20386559s22882p20386559.html
Sent from the Camel - Users mailing list archive at Nabble.com.