Migration - SQLException: No suitable driver

Jerome.Jargot's picture
Jerome.Jargot
Blog Categories: 

Component: Migration Tool | Version: 2.39.0

What can I do if I am unable to use the migration tool?

There are these messages in the migration-2019-03-19-124431.log file:

`+--------------------------------------------------------------------------------------------------------------------------+
| |
| Bonita migration tool 2.39.0 Subscription edition |
...
[INFO] Using property db.vendor from configuration file: sqlserver
[INFO] Using property db.url from configuration file: jdbc:sqlserver://dbserver:9876;database=bonitaprod
[INFO] Using property db.driverClass from configuration file: com.mysql.jdbc.Driver
...
Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:sqlserver://dbserver:9876;database=bonitaprod'
java.sql.SQLException: No suitable driverCaused by: java.sql.SQLException: No suitable driver`

Answer : These messages are generated because the class of the jdbc driver is not found.

You need to check:

  • db.driverClass property in the C:\bonita-migration-distrib-sp-2.39.0\Config.properties file:
    • Is there a typo in the driver class name?
    • Remove all leading (invisible) space chars (if any) from the line setting the value of the property
  • The jar files in the C:\bonita-migration-distrib-sp-2.39.0\lib directory: the involved class must be included in one of them. I.E. it must be found in the class path.

Resolution

In your situation, both db.vendor and db.url properties are referring to MS SQL server, but the db.driverClass property is set to com.mysql.jdbc.Driver.
The jdbc driver class name for MS SQL server is com.microsoft.sqlserver.jdbc.SQLServerDriver.

It is assumed that the sqljdbc4.jar file containing the SQLServerDriver class is already saved in the C:\bonita-migration-distrib-sp-2.39.0\lib directory.

  • Edit C:\bonita-migration-distrib-sp-2.39.0\Config.properties
  • Change the value of the db.driverClass property, and take care to not have invisible space chars at the end of the line

db.driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver

  • Run the migration again




Notifications