flyway: CLI 9.16.3 + Snowflake : ERROR: Incomplete statement at line

Which version and edition of Flyway are you using?

9.16.3

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)

yes, it’s not happening with 9.11.0

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

CLI

Which database are you using? (Type & version)

Snowflake 7.10

Which operating system are you using?

Platform: Linux-4.4.0-204-generic-x86_64-with-glibc2.23

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)

same test procedure as for last few years (apply migrations to clean fresh DB), i just updated flyway

command i use (sensitive info replaced):

/var/lib/jenkins/workspace/<JOB_NAME>/flyway/flyway migrate -schemas=CORE -url=jdbc:snowflake://<account>.snowflakecomputing.com:443/?ssl=on\&warehouse=<WH_NAME>\&db=frichtarik_<context>_20230210_225520\&schema=core\&role=<ROLE_NAME> -locations=filesystem:/migrations/core -placeholderPrefix=@{ -placeholderSuffix=}

What did you expect to see?

success (creation of schema and application of migrations)

What did you see instead?

INFO:root - QUOTED_IDENTIFIERS_IGNORE_CASE option is false INFO:root - Flyway Community Edition 9.14.1 by Redgate INFO:root - See what’s new here: https://flywaydb.org/documentation/learnmore/releaseNotes#9.14.1 INFO:root - INFO:root - Database: jdbc❄️//<account>.snowflakecomputing.com:443/ (Snowflake 7.4) INFO:root - QUOTED_IDENTIFIERS_IGNORE_CASE option is false INFO:root:Flyway migration error log: INFO:root - SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. INFO:root - SLF4J: Defaulting to no-operation (NOP) logger implementation INFO:root - SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. INFO:root - Feb 10, 2023 10:55:33 PM net.snowflake.client.jdbc.internal.apache.arrow.memory.BaseAllocator <clinit> INFO:root - INFO: Debug mode disabled. INFO:root - Feb 10, 2023 10:55:33 PM net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerOption getDefaultAllocationManagerFactory INFO:root - INFO: allocation manager type not specified, using netty as the default type INFO:root - Feb 10, 2023 10:55:33 PM net.snowflake.client.jdbc.internal.apache.arrow.memory.CheckAllocator reportResult INFO:root - INFO: Using DefaultAllocationManager at memory/DefaultAllocationManagerFactory.class INFO:root - Feb 10, 2023 10:55:33 PM net.snowflake.client.core.SFStatement executeQueryInternal INFO:root - SEVERE: Exception creating result INFO:root - java.lang.ExceptionInInitializerError INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.UnsafeAllocationManager.<clinit>(UnsafeAllocationManager.java:27) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerFactory.<clinit>(DefaultAllocationManagerFactory.java:26) INFO:root - at java.base/java.lang.Class.forName0(Native Method) INFO:root - at java.base/java.lang.Class.forName(Unknown Source) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerOption.getFactory(DefaultAllocationManagerOption.java:111) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerOption.getDefaultAllocationManagerFactory(DefaultAllocationManagerOption.java:101) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.BaseAllocator$Config.getAllocationManagerFactory(BaseAllocator.java:735) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig.access$801(ImmutableConfig.java:24) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig$InitShim.getAllocationManagerFactory(ImmutableConfig.java:83) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig.<init>(ImmutableConfig.java:47) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig.<init>(ImmutableConfig.java:24) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig$Builder.build(ImmutableConfig.java:485) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.BaseAllocator.<clinit>(BaseAllocator.java:63) INFO:root - at net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1.create(SnowflakeResultSetSerializableV1.java:577) INFO:root - at net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1.create(SnowflakeResultSetSerializableV1.java:489) INFO:root - at net.snowflake.client.core.SFResultSetFactory.getResultSet(SFResultSetFactory.java:29) INFO:root - at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:218) INFO:root - at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:133) INFO:root - at net.snowflake.client.core.SFStatement.execute(SFStatement.java:746) INFO:root - at net.snowflake.client.core.SFStatement.execute(SFStatement.java:656) INFO:root - at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQueryInternal(SnowflakeStatementV1.java:236) INFO:root - at net.snowflake.client.jdbc.SnowflakePreparedStatementV1.executeQuery(SnowflakePreparedStatementV1.java:118) INFO:root - at org.flywaydb.core.internal.jdbc.JdbcTemplate.queryForString(JdbcTemplate.java:158) INFO:root - at org.flywaydb.core.internal.database.snowflake.SnowflakeConnection.getCurrentSchemaNameOrSearchPath(SnowflakeConnection.java:51) INFO:root - at org.flywaydb.core.internal.database.base.Connection.<init>(Connection.java:49) INFO:root - at org.flywaydb.core.internal.database.snowflake.SnowflakeConnection.<init>(SnowflakeConnection.java:35) INFO:root - at org.flywaydb.core.internal.database.snowflake.SnowflakeDatabase.doGetConnection(SnowflakeDatabase.java:63) INFO:root - at org.flywaydb.core.internal.database.snowflake.SnowflakeDatabase.doGetConnection(SnowflakeDatabase.java:32) INFO:root - at org.flywaydb.core.internal.database.base.Database.getConnection(Database.java:88) INFO:root - at org.flywaydb.core.internal.database.base.Database.getMainConnection(Database.java:280) INFO:root - at org.flywaydb.core.internal.schemahistory.SchemaHistoryFactory.prepareSchemas(SchemaHistoryFactory.java:58) INFO:root - at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:172) INFO:root - at org.flywaydb.core.Flyway.migrate(Flyway.java:129) INFO:root - at org.flywaydb.commandline.Main.executeOperation(Main.java:354) INFO:root - at org.flywaydb.commandline.Main.main(Main.java:144) INFO:root - Caused by: java.lang.RuntimeException: Failed to initialize MemoryUtil. INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:139) INFO:root - … 35 more INFO:root - Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not “opens java.nio” to unnamed module @10adce03 INFO:root - at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source) INFO:root - at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source) INFO:root - at java.base/java.lang.reflect.Field.checkCanSetAccessible(Unknown Source) INFO:root - at java.base/java.lang.reflect.Field.setAccessible(Unknown Source) INFO:root - at net.snowflake.client.jdbc.internal.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:87) INFO:root - … 35 more INFO:root - INFO:root - ERROR: Unable to determine the original schema for the connection INFO:root - ---------------------------------------------------------- INFO:root - SQL State : XX000 INFO:root - Error Code : 200001 INFO:root - Message : JDBC driver internal error: exception creating result java.lang.ExceptionInInitializerError at net.snowflake.client.jdbc.internal.apache.arrow.memory.UnsafeAllocationManager.<clinit>(UnsafeAllocationManager.java:27). INFO:root - INFO:root - Caused by: net.snowflake.client.jdbc.SnowflakeSQLException: JDBC driver internal error: exception creating result java.lang.ExceptionInInitializerError at net.snowflake.client.jdbc.internal.apache.arrow.memory.UnsafeAllocationManager.<clinit>(UnsafeAllocationManager.java:27).

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (4 by maintainers)

Most upvoted comments

Thanks @frichtarik - There was indeed a problem with the escaped '.

There will be a fix for this in the next release and hopefully that unblocks you.