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

Table Does not exist #101

Open
wind57 opened this issue Sep 21, 2021 · 1 comment
Open

Table Does not exist #101

wind57 opened this issue Sep 21, 2021 · 1 comment

Comments

@wind57
Copy link

wind57 commented Sep 21, 2021

This is what I have:

cqlsh> CREATE KEYSPACE IF NOT EXISTS Killer_Video WITH replication = {'class':'SimpleStrategy', 'replication_factor':1};
cqlsh> use killer_video;
cqlsh:killer_video> describe tables;
cqlsh:killer_video>

OK, so nothing is there. If I run :

liquibase --username admin 
          --password admin 
          --url "jdbc:cassandra://192.168.0.5:9042/killer_video;DefaultKeyspace=killer_video" 
          --changelog-file databaseChangelog.json 
          --database-changelog-table-name liq-cassandra-database-changes 
           update

I get :

Cause: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: table liq-cassandra-database-changes does not exist.

Of course it does not exist, but aren't you suppose to create it? I am on version 4.4.3. Even if I use --databaseChangelogTableName, same result.

It seems that every feature I try to play with is either broken or does not work

@wind57
Copy link
Author

wind57 commented Sep 21, 2021

What is very weird is that if I run the above with --log-level INFO, I get :

Starting Liquibase at 15:35:17 (version 4.4.3 #53 built at 2021-08-05 18:32+0000)
Liquibase Version: 4.4.3
Liquibase Community 4.4.3 by Datical
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[2021-09-21 15:35:18] INFO [liquibase.ext] No DATABASECHANGELOGLOCK available in cassandra.
[2021-09-21 15:35:18] INFO [liquibase.ext] successfully.acquired.change.log.lock
[2021-09-21 15:35:19] WARNING [liquibase.ext] expecting exactly 1 table with name liq-cassandra-database-changes, got 0
[2021-09-21 15:35:19] INFO [liquibase.ext] Creating database history table with name: killer_video."liq-cassandra-database-changes"
[2021-09-21 15:35:19] INFO [liquibase.ext] Reading from killer_video."liq-cassandra-database-changes"
[2021-09-21 15:35:19] INFO [liquibase.changelog] Tag '2' applied to database
[2021-09-21 15:35:19] INFO [liquibase.changelog] Custom SQL executed
[2021-09-21 15:35:19] INFO [liquibase.changelog] ChangeSet databaseChangelog.json::2::wind57 ran successfully in 104ms
[2021-09-21 15:35:19] INFO [liquibase.ext] Successfully released change log lock
[2021-09-21 15:35:21] SEVERE [liquibase.integration] [Simba][CassandraJDBCDriver](500211) ERROR Invalid query: INSERT INTO killer_video."liq-cassandra-database-changes" (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID, TAG) VALUES ('2', 'wind57', 'databaseChangelog.json', 1632252919672, 1, '8:e69feb7f8fa4273e355e146b5265d243', 'tagDatabase; sql', '', 'EXECUTED', 'prod', 'blue', '4.4.3', '2252919453', '2'), Cause: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: table liq-cassandra-database-changes does not exist.
liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: Unexpected error running Liquibase: [Simba][CassandraJDBCDriver](500211) ERROR Invalid query: INSERT INTO killer_video."liq-cassandra-database-changes" (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID, TAG) VALUES ('2', 'wind57', 'databaseChangelog.json', 1632252919672, 1, '8:e69feb7f8fa4273e355e146b5265d243', 'tagDatabase; sql', '', 'EXECUTED', 'prod', 'blue', '4.4.3', '2252919453', '2'), Cause: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: table liq-cassandra-database-changes does not exist. [Failed SQL: (500211) INSERT INTO killer_video."liq-cassandra-database-changes" (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID, TAG) VALUES ('2', 'wind57', 'databaseChangelog.json', 1632252919672, 1, '8:e69feb7f8fa4273e355e146b5265d243', 'tagDatabase; sql', '', 'EXECUTED', 'prod', 'blue', '4.4.3', '2252919453', '2')]

There is a lot here. First :

Creating database history table with name: killer_video."liq-cassandra-database-changes"

But the table is not there if I check the keyspace. So the log says it has created it (but it's not there) and it immediately after fails with :

Cause: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: table liq-cassandra-database-changes does not exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant