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

Cannot configure a callback using flyway properties. #7

Open
jchu59 opened this issue Feb 3, 2017 · 0 comments
Open

Cannot configure a callback using flyway properties. #7

jchu59 opened this issue Feb 3, 2017 · 0 comments

Comments

@jchu59
Copy link

jchu59 commented Feb 3, 2017

What version of Flyway are you using?

release-4.0.3-mongodb

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)

Java API

What database are you using (type & version)?

MongoDB 3.3

What operating system are you using?

OSX El Capitan

What did you do?

(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
Try to configure a callback with the flyway.callbacks property.

What did you expect to see?

A callback executed

What did you see instead?

ClassUtils.instantiate throws a NoSuchMethod exception.

The Callback interface is not public. The abstract MongoFlywayCallback class defines a one-arg method. The ClassUtils that is used to instantiate a configured callback uses Class.forName to instantiate, and that only works with zero-arg constructors. We cannot extend MongoFlywayCallback and add a zero-arg constructor.

Our workaround is to manually set a callback into MongoFlyway, but this is a limited-value solution.

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

No branches or pull requests

1 participant