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
java.lang.ClassNotFoundException is raised when referring to the flyway.callbacks property #2829
Comments
Could it be a setup error on my part? |
So Gradle knows there is a Java migration called |
@juliahayward I created a constructor, and the result was the same. |
We've managed to reproduce the issue, and are looking at developing a fix. Hopefully for the next patch. |
Okay so on further investigation, this is actually simpler than we thought. The issue is occurring because the callback class has not yet been built. You can fix this in one of 2 ways. Solution 1: Make the migrate task depend on the classes task. You can do this by adding Solution 2: Call gradle like so: |
@Lyeeedar |
Which version and edition of Flyway are you using?
6.4.2 CE
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Gradle plugin
Which database are you using (type & version)?
Postgres 12
Which operating system are you using?
mac OS Catalina 10.15.2
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
docker-compose up -d
./gradlew flywayMigrate
I'm using Intellij IDEA 2019.3.3 for development.
I wanted to create tables in SQL and populate them with test data in Java.
This is because we wanted to change the test data by environment variables.
What did you expect to see?
The ability to perform Java callbacks and submit test data.
What did you see instead?
It's a stacktrace(
./gradlew flywayMigrate --stacktrace
).The text was updated successfully, but these errors were encountered: