Liquibase is using some stupid classLoader trick. That’s where the problem comes from. Try adding classpath to your liquibase.properties file instead of using command line arguments. This worked for me ####################### url=jdbc:hsqldb:mem:file:test username=SA password= defaultSchemaName=PUBLIC changeLogFile=master.xml classpath=hsqldb-2.2.8.jar
Liquibase is a great tool. Though it really does some classloader trick. When your jars are in java’s classpath but they are not specified in liquibase’s classpath property - it will say “Cannot find database driver”.
And I missed something when answering the original question. el_litos provided classpath only for Oracle driver and not for Derby. That was his problem.
Liquibase is not using any classloader tricks. Adding classpath to your liquibase.properties file is exactly the same as adding it via the --classpath switch.
One nice undocumented thing is that liquibase will automatically add any jars that are present in its lib directory to the classpath. Don’t have a lib directory? Make one, and put your database driver .jar files in there. Then you don’t have to add them to any Liquibase classpath manually.
Another nice undocumented thing (noticing a trend?) is that the --driver argument is not required. JDBC will find the proper driver to handle the URL for you.
So if you couple these two things together, you can lose a big chunk off your arguments to liquibase.