Liquibase and SQLite

六眼飞鱼酱① 提交于 2019-12-11 13:23:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!