You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executing a Liquibase update to an Astra Cassandra instance fails. Although the keyspace is passed in the JDBC connection, Liquibase is not using it when attempting to create the databasechangelog/lock tables. The error returned is:
Update Error
{NOFORMAT}
Unexpected error running Liquibase: [Simba]CassandraJDBCDriver ERROR Invalid query: CREATE TABLE IF NOT EXISTS databasechangeloglock (ID INT, LOCKED BOOLEAN, LOCKGRANTED timestamp, LOCKEDBY TEXT, PRIMARY KEY (ID)), Cause: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename. [Failed SQL: (500211) CREATE TABLE IF NOT EXISTS databasechangeloglock (ID INT, LOCKED BOOLEAN, LOCKGRANTED timestamp, LOCKEDBY TEXT, PRIMARY KEY (ID))]
For more information, please use the --logLevel flag
{NOFORMAT}
Stack Trace
{NOFORMAT}
Caused by: com.simba.cassandra.support.exceptions.GeneralException: [Simba]CassandraJDBCDriver ERROR Invalid query: CREATE TABLE IF NOT EXISTS databasechangeloglock (ID INT, LOCKED BOOLEAN, LOCKGRANTED timestamp, LOCKEDBY TEXT, PRIMARY KEY (ID)), Cause: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename.
... 30 more
Caused by: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename
at com.simba.cassandra.shaded.datastax.driver.core.Responses$Error.asException(Responses.java:181)
at com.simba.cassandra.shaded.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:215)
at com.simba.cassandra.shaded.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:235)
at com.simba.cassandra.shaded.datastax.driver.core.RequestHandler.access$2600(RequestHandler.java:61)
at com.simba.cassandra.shaded.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:1005)
at com.simba.cassandra.shaded.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:808)
at com.simba.cassandra.shaded.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1262)
at com.simba.cassandra.shaded.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1180)
at com.simba.cassandra.shaded.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:312)
at com.simba.cassandra.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:286)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at com.simba.cassandra.shaded.datastax.driver.core.InboundTrafficMeter.channelRead(InboundTrafficMeter.java:38)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1337)
at com.simba.cassandra.shaded.io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1108)
at com.simba.cassandra.shaded.io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1151)
at com.simba.cassandra.shaded.io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:491)
at com.simba.cassandra.shaded.io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:430)
at com.simba.cassandra.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1304)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:921)
at com.simba.cassandra.shaded.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:135)
at com.simba.cassandra.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
at com.simba.cassandra.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
at com.simba.cassandra.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
at com.simba.cassandra.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
at com.simba.cassandra.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131)
at com.simba.cassandra.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
{NOFORMAT}
Steps to Reproduce
Ensure you have a Cassandra database running on Datastax Astra.
Follow the Datastax Astra instructions to get the Java driver security bundle.
Follow the Datastax Astra instructions on how to generate an access token; username and password are no longer sufficient to connect to the Astra instance.
Download the Cassandra JDBC driver and put it in the liquibase/lib directory.
Download the latest version of liquibase-cassandra and put it in the liquibase/lib directory.
Create a keyspace on your Astra instance OR get the name of an existing keyspace to use in the test.
Update the Liquibase properties file to include the driver class and connection URL. For example,
{CODE}
driver: com.simba.cassandra.jdbc42.Driver
url:jdbc:cassandra://hostnameOfAstraInstance:portOfAstraInstance/;AuthMech=2;UID=;PWD=;SecureConnectionBundlePath=secure-connect-erzcassandra01.zip;TunableConsistency=6
{CODE}
Execute a Liquibase update. For example:
{NOFORMAT}
liquibase --logLevel=FINE --logFile=27IV21.txt --changeLogFile=cassandra_simple_changelog.xml update
{NOFORMAT}
Oleh Kushniryk, thank you! I tried adding DefaultKeyspace to the URL prior to writing up this bug. I tried again after seeing your comment but I get the same error.
Here is my URL:
{CODE}
url:jdbc:cassandra://cassandra.db.astra.datastax.com:PORT/DefaultKeyspace=posts_db;AuthMech=2;UID=clientKey;PWD=clientSecret;SecureConnectionBundlePath=secure-connect-erzcassandra01.zip;TunableConsistency=6
{CODE}
Do you see a mistake in the structure of that connection string?
Executing a Liquibase update to an Astra Cassandra instance fails. Although the keyspace is passed in the JDBC connection, Liquibase is not using it when attempting to create the databasechangelog/lock tables. The error returned is:
Update Error
{NOFORMAT}
Unexpected error running Liquibase: [Simba]CassandraJDBCDriver ERROR Invalid query: CREATE TABLE IF NOT EXISTS databasechangeloglock (ID INT, LOCKED BOOLEAN, LOCKGRANTED timestamp, LOCKEDBY TEXT, PRIMARY KEY (ID)), Cause: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename. [Failed SQL: (500211) CREATE TABLE IF NOT EXISTS databasechangeloglock (ID INT, LOCKED BOOLEAN, LOCKGRANTED timestamp, LOCKEDBY TEXT, PRIMARY KEY (ID))]
For more information, please use the --logLevel flag
{NOFORMAT}
Stack Trace
{NOFORMAT}
Caused by: com.simba.cassandra.support.exceptions.GeneralException: [Simba]CassandraJDBCDriver ERROR Invalid query: CREATE TABLE IF NOT EXISTS databasechangeloglock (ID INT, LOCKED BOOLEAN, LOCKGRANTED timestamp, LOCKEDBY TEXT, PRIMARY KEY (ID)), Cause: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename.
... 30 more
Caused by: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename
at com.simba.cassandra.shaded.datastax.driver.core.Responses$Error.asException(Responses.java:181)
at com.simba.cassandra.shaded.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:215)
at com.simba.cassandra.shaded.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:235)
at com.simba.cassandra.shaded.datastax.driver.core.RequestHandler.access$2600(RequestHandler.java:61)
at com.simba.cassandra.shaded.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:1005)
at com.simba.cassandra.shaded.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:808)
at com.simba.cassandra.shaded.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1262)
at com.simba.cassandra.shaded.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1180)
at com.simba.cassandra.shaded.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:312)
at com.simba.cassandra.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:286)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at com.simba.cassandra.shaded.datastax.driver.core.InboundTrafficMeter.channelRead(InboundTrafficMeter.java:38)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1337)
at com.simba.cassandra.shaded.io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1108)
at com.simba.cassandra.shaded.io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1151)
at com.simba.cassandra.shaded.io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:491)
at com.simba.cassandra.shaded.io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:430)
at com.simba.cassandra.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
at com.simba.cassandra.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1304)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
at com.simba.cassandra.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
at com.simba.cassandra.shaded.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:921)
at com.simba.cassandra.shaded.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:135)
at com.simba.cassandra.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
at com.simba.cassandra.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
at com.simba.cassandra.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
at com.simba.cassandra.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
at com.simba.cassandra.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131)
at com.simba.cassandra.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
{NOFORMAT}
Steps to Reproduce
{CODE}
driver: com.simba.cassandra.jdbc42.Driver
url:jdbc:cassandra://hostnameOfAstraInstance:portOfAstraInstance/;AuthMech=2;UID=;PWD=;SecureConnectionBundlePath=secure-connect-erzcassandra01.zip;TunableConsistency=6
{CODE}
{NOFORMAT}
liquibase --logLevel=FINE --logFile=27IV21.txt --changeLogFile=cassandra_simple_changelog.xml update
{NOFORMAT}
Expected Results
The update succeeds without error.
Actual Results
The update fails with the error message above.
┆Issue is synchronized with this Jira Bug by Unito
The text was updated successfully, but these errors were encountered: