Hi,

I am using servicemix-jdbc jbi component with MYSQL database with following
configuration details

<beans xmlns:jdbc="http://servicemix.apache.org/jdbc/1.0"; 
             xmlns:ls="http://servicemix.apache.org/samples/logging-sample";>

  <jdbc:provider service="ls:jdbcService" endpoint="endpoint"
dataSource="#dSource" />

  <bean id="dSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="com.mysql.jdbc.Driver"/> 
    <property name="url" value="jdbc:mysql://localhost/dbtest"/> 
        <property name="username" value="root"/> 
        <property name="password" value="root"/> 
  </bean>
        
</beans>

I have already put all the related jar files(e.g
mysql-connector-java-5.1.6.jar) in classpath.

Even then i am getting following exception

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get
JDBC Connection; nested exception is java.sql.SQLException: No suitable
driver
Caused by: 
java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getConnection(DriverManager.java:545)
        at java.sql.DriverManager.getConnection(DriverManager.java:140)
        at
org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:281)
        at
org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:269)
        at
org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:253)
        at
org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:234)
        at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)
        at
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)
        at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:574)
        at 
org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:789)
        at 
org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:847)
        at 
org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:855)
        at
org.apache.servicemix.jdbc.JdbcProviderEndpoint.executeJdbcNoResult(JdbcProviderEndpoint.java:193)
        at
org.apache.servicemix.jdbc.JdbcProviderEndpoint.processInOnly(JdbcProviderEndpoint.java:119)
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:100)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

I also tried with different versions of mysql connector jar file but no
luck.

Please help me.
-- 
View this message in context: 
http://www.nabble.com/servicemix-jdbc-%3Ajava.sql.SQLException%3A-No-suitable-driver-tp16584565p16584565.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to