Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "Unable to instantiate JDBC driver" Flyway command line error?

I'm new to Flyway. I'm using Flyway 3.2.1 on windows 64bit and just tried the command line tool with my local Oracle database installation (11g). I'm getting the following error:

ERROR: Unable to instantiate JDBC driver: oracle.jdbc.OracleDriver

What did I do wrong? In flyway.conf I configured my jdbc url and also username and password.

Thanks in advance Matze

like image 213
Matze Avatar asked May 04 '15 14:05

Matze


2 Answers

Problem solved. For Oracle you have to put the jdbc driver jar in the drivers sub directory.

like image 79
Matze Avatar answered Oct 16 '22 07:10

Matze


This is documented here.

In summary: Go to http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html and choose the required Oracle JDBC driver version. Then download the "ojdbc6.jar" file and move it into the drivers folder beneath where Flyway is installed. The next time you run Flyway this should be picked up automatically.

like image 36
Steve Chambers Avatar answered Oct 16 '22 07:10

Steve Chambers