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

IllegalArgument when executing Flyway Ant build script several times in the same JVM #484

flyway opened this issue Jun 25, 2013 · 2 comments


Copy link

flyway commented Jun 25, 2013

Original author: (May 03, 2013 14:01:52)

I have an Ant build script containing Flyway tasks and a main method wrapping the script's execution.
When the main method is executed several times by restarting the JVM, everything is fine and the tasks execute cleanly. But if the main method gets called several times within the same JVM, only the first invocation succeeds, the subsequent ones fails with the following error message: "java.lang.IllegalArgumentException: null source".

This message is the one of the following exception:
Caused by: java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(
at com.googlecode.flyway.ant.AntLog.debug(
at com.googlecode.flyway.core.dbsupport.DbSupportFactory.createDbSupport(
at com.googlecode.flyway.core.Flyway.execute(
at com.googlecode.flyway.ant.MigrateTask.doExecuteWithMigrationConfig(
at com.googlecode.flyway.ant.AbstractMigrationLoadingTask.doExecute(
at com.googlecode.flyway.ant.AbstractFlywayTask.execute(
... 33 more

Behaviour was observed with Flyway 2.1.1 and Ant 1.8.5.

Original issue:

Copy link
Collaborator Author

flyway commented Jun 25, 2013

From on May 03, 2013 14:06:25
The issue comes from the fact that the Project instance referenced by the AntLog instance referenced as the LOG static field of DbSupportFactory is not the Project instance being executed for invocations after the first one. As a consequence, it does not contain any threaded tasks and returns a null Task.

Copy link


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

1 participant