-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Nullpointer on java-based migration #3092
Closed
eikek opened this issue
Feb 24, 2021
· 0 comments
· Fixed by dropwizard/dropwizard-flyway#151, dummy-org-gsd-days/spring-boot-example#74, exAphex/asena#46, Timmi6790/StatsApi#104 or stub-idp/stub-idp#628
Closed
Nullpointer on java-based migration #3092
eikek opened this issue
Feb 24, 2021
· 0 comments
· Fixed by dropwizard/dropwizard-flyway#151, dummy-org-gsd-days/spring-boot-example#74, exAphex/asena#46, Timmi6790/StatsApi#104 or stub-idp/stub-idp#628
Labels
Milestone
Comments
eikek
changed the title
Nullpointer on javabased migration
Nullpointer on java-based migration
Feb 24, 2021
This was referenced Mar 5, 2021
This was referenced Mar 12, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Which version and edition of Flyway are you using?
7.5.4
If this is not the latest version, can you reproduce the issue with the latest one as well? (Many bugs are fixed in newer releases and upgrading will often resolve the issue)
I'm using the newest version.
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Java-API.
Which database are you using? (Type & version)
H2 1.4.200, MS-SQL
Which operating system are you using?
GNU/Linux
What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)
I created a java-based Migration as described here. The migration creates a simple table. The migration is picked up by Flyway and tried to execute.
However, it fails to create a
ResolvedMigration
, because of a NPE insideClassUtils
, line 196:In our case (we are using Guice), the
CodeSource
is non-null, but all fields in there arenull
, i.e.getLocation()
returnsnull
, which results in the NPE when accessinggetPath
.What did you expect to see?
I expect Flyway to check for
null
for all properties inCodeSource
. It doesn't state in it's api docs that it's always non-null.What did you see instead?
A NPE is thrown.
Thank you!
The text was updated successfully, but these errors were encountered: