Which version and edition of Flyway are you using?
6.0.4
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Java API
Which database are you using (type & version)?
H2 with MySql compatibility mode
Which operating system are you using?
Mac OS
What did you do?
When updating Flyway from 5.2.4 to 6.0.4 we started hitting a NullPointerException due to supplying a null placeholder value.
The null placeholder value used to work in 5.2.4 and still works on a MySql database but seems broken for H2 running with MySql compatibility mode.
As a workaround, we're able to supply empty quotes which behave well on both MySql and H2.
Exception
java.lang.NullPointerException: null
at org.flywaydb.core.internal.parser.PlaceholderReplacingReader.<init>(PlaceholderReplacingReader.java:56)
at org.flywaydb.core.internal.parser.Parser.replacePlaceholders(Parser.java:130)
at org.flywaydb.core.internal.parser.Parser.parse(Parser.java:111)
at org.flywaydb.core.internal.sqlscript.ParserSqlScript.parse(ParserSqlScript.java:76)
at org.flywaydb.core.internal.sqlscript.ParserSqlScript.validate(ParserSqlScript.java:124)
at org.flywaydb.core.internal.sqlscript.ParserSqlScript.getSqlStatements(ParserSqlScript.java:130)
at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:97)
at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory$1$1.call(JdbcTableSchemaHistory.java:113)
at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74)
at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory$1.call(JdbcTableSchemaHistory.java:106)
at org.flywaydb.core.internal.database.base.Connection$1.call(Connection.java:131)
at org.flywaydb.core.internal.jdbc.TransactionTemplate.execute(TransactionTemplate.java:74)
at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:127)
at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.create(JdbcTableSchemaHistory.java:97)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:178)
at org.flywaydb.core.Flyway$1.execute(Flyway.java:143)
at org.flywaydb.core.Flyway.execute(Flyway.java:507)
at org.flywaydb.core.Flyway.migrate(Flyway.java:143)
What did you expect to see?
Migration to pass as it used to in 5.2.4
What did you see instead?
provided stacktrace
The text was updated successfully, but these errors were encountered:
Would you be able to supply a sample script that we can test with, please? Also, are you supplying the null parameter via config file, Java API, environment variable ...?
Which version and edition of Flyway are you using?
6.0.4
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Java API
Which database are you using (type & version)?
H2 with MySql compatibility mode
Which operating system are you using?
Mac OS
What did you do?
When updating Flyway from 5.2.4 to 6.0.4 we started hitting a
NullPointerException
due to supplying a null placeholder value.The null placeholder value used to work in 5.2.4 and still works on a MySql database but seems broken for H2 running with MySql compatibility mode.
As a workaround, we're able to supply empty quotes which behave well on both MySql and H2.
Exception
What did you expect to see?
Migration to pass as it used to in 5.2.4
What did you see instead?
provided stacktrace
The text was updated successfully, but these errors were encountered: