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

NullPointerException while applying repeatable migration with Maven #1533

Closed
vboldurat opened this issue Feb 16, 2017 · 0 comments
Closed

NullPointerException while applying repeatable migration with Maven #1533

vboldurat opened this issue Feb 16, 2017 · 0 comments

Comments

@vboldurat
Copy link

@vboldurat vboldurat commented Feb 16, 2017

What version of Flyway are you using?

4.1.0

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

Maven plugin

What database are you using (type & version)?

Oracle 12.1.0

What operating system are you using?

Windows 7, 64bit

What did you do?

I have tried to execute repeatable migration:

CREATE SYNONYM currency FOR ${prefix}_refdata.currency;

What did you expect to see?

Success result, because 4.0.3 works as expected.

What did you see instead?

I put stack trace

[DEBUG] Spring Jdbc available: false
[DEBUG] Scanning for SQL callbacks ...
[DEBUG] Scanning for filesystem resources at 'C:/Personal/Projects/PRJ/src/PRJ-database/flyway/PRJ-database-coreuser' (Prefix: '', Suffix: '.sql')
[DEBUG] Scanning for resources in path: C:\Personal\Projects\PRJ\src\PRJ-database\flyway\PRJ-database-coreuser (C:/Personal/Projects/PRJ/src/PRJ-database/flyway
/PRJ-database-coreuser)
[DEBUG] Scanning for resources in path: C:\Personal\Projects\PRJ\src\PRJ-database\flyway\PRJ-database-coreuser\synonyms (C:/Personal/Projects/PRJ/src/PRJ-databa
se/flyway/PRJ-database-coreuser)
[DEBUG] Found filesystem resource: C:\Personal\Projects\PRJ\src\PRJ-database\flyway\PRJ-database-coreuser\synonyms\R__00001_synonyms.sql
[DEBUG] Scanning for filesystem resources at 'C:/Personal/Projects/PRJ/src/PRJ-database/flyway/PRJ-database-coreuser' (Prefix: 'V', Suffix: '.sql')
[DEBUG] Scanning for resources in path: C:\Personal\Projects\PRJ\src\PRJ-database\flyway\PRJ-database-coreuser (C:/Personal/Projects/PRJ/src/PRJ-database/flyway
/PRJ-database-coreuser)
[DEBUG] Scanning for resources in path: C:\Personal\Projects\PRJ\src\PRJ-database\flyway\PRJ-database-coreuser\synonyms (C:/Personal/Projects/PRJ/src/PRJ-databa
se/flyway/PRJ-database-coreuser)
[DEBUG] Filtering out resource: C:\Personal\Projects\PRJ\src\PRJ-database\flyway\PRJ-database-coreuser\synonyms\R__00001_synonyms.sql (filename: R__00001_synony
ms.sql)
[DEBUG] Scanning for filesystem resources at 'C:/Personal/Projects/PRJ/src/PRJ-database/flyway/PRJ-database-coreuser' (Prefix: 'R', Suffix: '.sql')
[DEBUG] Scanning for resources in path: C:\Personal\Projects\PRJ\src\PRJ-database\flyway\PRJ-database-coreuser (C:/Personal/Projects/PRJ/src/PRJ-database/flyway
/PRJ-database-coreuser)
[DEBUG] Scanning for resources in path: C:\Personal\Projects\PRJ\src\PRJ-database\flyway\PRJ-database-coreuser\synonyms (C:/Personal/Projects/PRJ/src/PRJ-databa
se/flyway/PRJ-database-coreuser)
[DEBUG] Found filesystem resource: C:\Personal\Projects\PRJ\src\PRJ-database\flyway\PRJ-database-coreuser\synonyms\R__00001_synonyms.sql
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.449 s
[INFO] Finished at: 2017-02-16T13:31:26+00:00
[INFO] Final Memory: 11M/185M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:4.1.0:migrate (default-cli) on project bar: java.lang.NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.flywaydb:flyway-maven-plugin:4.1.0:migrate (default-cli) on project bar: java
.lang.NullPointerException
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: java.lang.NullPointerException
at org.flywaydb.maven.AbstractFlywayMojo.execute(AbstractFlywayMojo.java:577)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.NullPointerException
at org.flywaydb.maven.MigrateMojo.doExecute(MigrateMojo.java:34)
at org.flywaydb.maven.AbstractFlywayMojo.execute(AbstractFlywayMojo.java:575)
... 22 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@vboldurat vboldurat changed the title NullPointerException while applying repeatable migration with "CREATE SYNONYM" - FlyWay 4.1.0 wirh Oracle 12.1.0 NullPointerException while applying repeatable migration with "CREATE SYNONYM" - FlyWay 4.1.0 with Oracle 12.1.0 Feb 16, 2017
@axelfontaine axelfontaine added this to the Flyway 4.1.1 milestone Feb 16, 2017
@axelfontaine axelfontaine changed the title NullPointerException while applying repeatable migration with "CREATE SYNONYM" - FlyWay 4.1.0 with Oracle 12.1.0 NullPointerException while applying repeatable migration with Maven Feb 16, 2017
axelfontaine added a commit to flyway/flywaydb.org that referenced this issue Feb 16, 2017
pradheeps pushed a commit to pradheeps/flyway that referenced this issue Mar 7, 2017
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
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