No suitable driver found for jdbc:oracle:thin:@localhost:1521:xe

1,364 views
Skip to first unread message

Nayan Shah

unread,
Jun 17, 2018, 5:33:03 PM6/17/18
to Smooks Users
So I am trying to access datasource in a datasource.xml which is deployed in the deploy folder of my apache servicemix. This datasource is being called from the smooks-config.xml also deployed in the deploy folder. Given below are snippets of both of them.

smooks-config.xml
...
...
<db:executor executeOnElement="interchange" datasource="abcDataSource">
        <db:statement>select abc from xyz where leg_id = ${aaa.trackingNum}</db:statement>
        <db:resultSet name="trackingNum" />
</db:executor>
...
...

datasource.xml
...
...
<ds:direct bindOnElement="$document" datasource="abcDataSource" autoCommit="false"
               driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:xe"
               username="nnn" password="nnn" />
...
...

Problem is no matter what I do, I get the error mentioned below.
Caused by: java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@localhost:1521:xe

Here are the things I have tried.
- Added ojdbc6.jar to CLASSPATH.
- Copied ojdbc6.jar to deploy folder of apache servicemix.
- Copied ojdbc6.jar to lib/ext folder of apache servicemix and also to the jre/lib folder of java installation.
- Installed ojdbc6.jar as a osgi bundle inside apache servicemix.

Inspite of the above the error does not go away and still persists.
Reply all
Reply to author
Forward
0 new messages