liquibase diff; Cannot find database driver

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
   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

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

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

Nathan

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)

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

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

java -jar liquibase-1.9.5.jar
  --classpath=PATH_TO_DRIVER
  --driver=oracle.jdbc.OracleDriver
  --url=jdbc:oracle:thin:@dbserver:1580:db
  --username=schema1
  --password=pwd
    diff
  --baseUrl=jdbc:oracle:thin:@dbserver:1580:db
  --baseDriver=oracle.jdbc.OracleDriver
  --baseUsername=schema2
  --password=pwd

It should include the system classpath by default, though.

Nathan

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

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

Nathan