# liquibase diff; Cannot find database driver

**URL:** https://forum.liquibase.org/t/liquibase-diff-cannot-find-database-driver/728
**Category:** General Discussion
**Created:** [August 17, 2010, 8:54am UTC](https://forum.liquibase.org/t/liquibase-diff-cannot-find-database-driver/728 "2010-08-17T08:54:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![svaret](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@svaret](https://forum.liquibase.org/u/svaret)
#### Post date: [August 17, 2010, 8:54am UTC](https://forum.liquibase.org/t/liquibase-diff-cannot-find-database-driver/728/1 "2010-08-17T08:54:00Z")

</div>

Hi, I am trying to run the liquibase diff tool and I keep getting this

C:\dev\liquibase-1.9.5\>java -jar liquibase-1.9.5.jar   
–driver=oracle.jdbc.OracleDriver   
–url=jdbc:oracle:thin:@dbserver:1580:db   
–username=schema1   
–password=pwd   
&nbsp; &nbsp;diff   
–baseUrl=jdbc:oracle:thin:@dbserver:1580:db   
–baseDriver=oracle.jdbc.OracleDriver   
–baseUsername=schema2   
–password=pwd

Migration Failed: Cannot find database driver: oracle.jdbc.OracleDriver

ojdbc14-10.2.0.4.jar is in the classpath

I am running liquibase 1.9.5 om Windows.

Does anyone have a clue?

Best regards /Lasse

---

<div class="post-metadata">

### Author: ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)
#### Post date: [August 17, 2010, 8:54am UTC](https://forum.liquibase.org/t/liquibase-diff-cannot-find-database-driver/728/2 "2010-08-17T08:54:00Z")

</div>

How is it int he classpath?&nbsp; Using the CLASSPATH env variable?

Does it help if you add a -cp ojdbc14…jar parameter to the java call before -jar ?

Nathan

---

<div class="post-metadata">

### Author: ![svaret](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@svaret](https://forum.liquibase.org/u/svaret)
#### Post date: [August 17, 2010, 8:54am UTC](https://forum.liquibase.org/t/liquibase-diff-cannot-find-database-driver/728/3 "2010-08-17T08:54:00Z")

</div>

I tried

- pointing out the jar in the CLASSPATH variable
- pointing out the jar via -cp and --classpath

I then get “Illegal argument” (or something alike, I am not at work right now so I don’t remember the exact phrase)

_(A peculiar thing is that Migration Failed: Cannot find database driver: oracle.jdbc.OracleDriver even before specifying --driver=oracle.jdbc.OracleDriver)_

---

<div class="post-metadata">

### Author: ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)
#### Post date: [August 17, 2010, 8:54am UTC](https://forum.liquibase.org/t/liquibase-diff-cannot-find-database-driver/728/4 "2010-08-17T08:54:00Z")

</div>

It will default the oracle.jdbc.OracleDriver based on your URL string if you don’t specify it.&nbsp;

Actually, there is a --classpath liquibase parameter that you can use to specify the JDBC driver.&nbsp; So:

java -jar liquibase-1.9.5.jar   
&nbsp; --classpath=PATH\_TO\_DRIVER   
&nbsp; --driver=oracle.jdbc.OracleDriver   
&nbsp; --url=jdbc:oracle:thin:@dbserver:1580:db   
&nbsp; --username=schema1   
&nbsp; --password=pwd   
&nbsp; &nbsp; diff   
&nbsp; --baseUrl=jdbc:oracle:thin:@dbserver:1580:db   
&nbsp; --baseDriver=oracle.jdbc.OracleDriver   
&nbsp; --baseUsername=schema2   
&nbsp; --password=pwd

It should include the system classpath by default, though.

Nathan

---

<div class="post-metadata">

### Author: ![svaret](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@svaret](https://forum.liquibase.org/u/svaret)
#### Post date: [August 17, 2010, 8:54am UTC](https://forum.liquibase.org/t/liquibase-diff-cannot-find-database-driver/728/5 "2010-08-17T08:54:00Z")

</div>

I have tried this without any luck. Windows XP is the OS

---

<div class="post-metadata">

### Author: ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)
#### Post date: [August 17, 2010, 8:54am UTC](https://forum.liquibase.org/t/liquibase-diff-cannot-find-database-driver/728/6 "2010-08-17T08:54:00Z")

</div>

I’m going to be on on vacation until Aug 29th, so I’ll get back to you after then.&nbsp; Sorry I wasn’t able to give you a good answer beforehand.&nbsp; Ended up with too much going on…

Nathan
