问题
How do I go about actually creating a SQLite DB-file? This command won't work:
liquibase --driver=jdbc.driver.sqlite --changeLogFile=assets_db.xml --url=file.db update
With the error:
Migration Failed: Cannot find database driver: jdbc.driver.sqlite
回答1:
It seems that you don't have the sqlite JDBC driver.
Have you downloaded the JDBC driver for sqlite? If not try this one:
http://www.zentus.com/sqlitejdbc/
And the correct liquibase command will be:
liquibase --driver=org.sqlite.JDBC
Hope this work for you.
回答2:
This is a very old thread, but in googling for this it's one of the few hits that came up - so in case anyone else ever trips over the 'with driver java.lang.String' problem, here's a quick fix.
In my case, the URL in the properties file was surrounded with quotes (which is sometimes needed on the command line). Removing the quotes allowed liquibase to run fine. I believe the 'java.lang.string' error points to a problem in the JDBC URL - either bad formatting or unparseable content.
I hope this helps others...
来源:https://stackoverflow.com/questions/4460433/liquibase-and-sqlite