2 Replies Latest reply on Aug 25, 2009 2:40 AM by sivaram

    Datasource not found in registry

    sivaram

       

      Hi,

       

        I'm trying to create a generic endpoint which has the uri - sql:insert into test values(#)?dataSourceRef=myDataSource

        Below is the contents of my spring bean definition

       

        <bean id="sql" class="org.apache.camel.component.sql.SqlComponent">

       

       

          <property name="dataSource" ref="myDataSource"/>

       

       

        </bean>

       

         

       

       

         <bean id="myDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">

       

       

         <property name="driverClassName" value="org.gjt.mm.mysql.Driver" />

       

       

         <property name="url" value="jdbc:mysql://localhost:3306/test" />

       

       

         <property name="username" value="root" />

       

       

         <property name="password" value="admin" />

       

       

         </bean>

       

        When I try to deploy the EIP diagram, I get the following exception. Please let me know what else I need to do.

       

        Caused by: java.lang.IllegalArgumentException: DataSource myDataSource not found in registry at

        org.apache.camel.component.sql.SqlComponent.createEndpoint(_SqlComponent.java:47_)