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

Unhelpful error when forgetting "flyway.driver" with xerial sqlite-jdbc #746

Closed
oadam opened this issue May 2, 2014 · 1 comment
Closed

Comments

@oadam
Copy link

@oadam oadam commented May 2, 2014

Hello,
I am using flyway with a sqlite database managed by xerial sqlite-jdbc. I had forgotten to set the "driver" property of the flyway maven plugin and it took me 3 hours to figure out :-( .

What is particularly tricky is that for some reason, when I forget this property, flyway is usable but crashes only when opening a connection for the second time.

Here is a minimal code which illustrates how the flyway:migrate mojo crashes:

        Flyway flyway = new Flyway();
        Properties props = new Properties();
        //uncomment this to fix the code
        //props.setProperty("flyway.driver", "org.sqlite.JDBC");
        props.setProperty("flyway.url", "jdbc:sqlite:mydb.db");
        props.setProperty("flyway.user", "sa");
        flyway.configure(props);

        //first invocation works fine
        flyway.info();
        //here comes the crash
        flyway.migrate();
@axelfontaine axelfontaine added this to the Flyway 3.1 milestone May 2, 2014
@axelfontaine axelfontaine added Android and removed Android labels May 2, 2014
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented May 2, 2014

Hi Olivier,

Sorry about the trouble and thank you for the nice repro test case. Somehow a bug had escaped my single-connection mode datasource (new as of Flyway 3.0 and required for SQLite) testing. It is now fixed.

Cheers
Axel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.