Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite DB locked when you specify flywayDriver #1318

reactormonk opened this issue May 21, 2016 · 3 comments

sqlite DB locked when you specify flywayDriver #1318

reactormonk opened this issue May 21, 2016 · 3 comments


Copy link

What version of Flyway are you using?


What database are you using (type & version)?

sqlite / xerial /

What operating system are you using?


What did you do?
libraryDependencies ++= Seq(
  "org.xerial" % "sqlite-jdbc" % ""

flywayUrl := "jdbc:sqlite:buddy.db"
flywayDriver := "org.sqlite.JDBC"

With a random migration, e.g.

create table user
  id integer primary key,

Then run

sbt flywayMigrate
What did you expect to see?


What did you see instead?
Caused by: java.sql.SQLException: database is locked

That only happens when I specify

flywayDriver := "org.sqlite.JDBC"

without it, it works just fine.

Copy link

kinow commented Sep 27, 2016

Same was happening for me, saved by @axelfontaine 's comment about not setting the JDBC driver. That indeed fixed the issue for me.

Here's a simple example:

Checking out that directory, and running flyway migrate will create a database.sqlite in the current directory. If you edit flyway.conf, uncommenting the driver, you'll get the error.

Thanks @axelfontaine !

Copy link

kinow commented Sep 29, 2016

Checked out the latest code, used instructions in this SO question to build the project, then in Eclipse copied the original installation drivers and jars directories over to flyway-commandline maven module.

Was ready to debug the issue, but actually, when I run the migrate command with the same scenario, it works.

So I believe it has been fixed in the -trunk- master already :-)

My checkout revision: 8b9dbfa

Hope that helps.

Copy link

This has now been fixed as part of #1499 (see my comment on that issue for the cause)

Thanks for investigating!

axelfontaine pushed a commit to flyway/ that referenced this issue Jan 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants