-
Notifications
You must be signed in to change notification settings - Fork 25
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
Cassandra liquibase usage #25
Comments
Hello @bjornph, Do you only got this error message or do you have a full stack trace to provide? It could be helpful to better understand where it fails exactly (because it seems that Liquibase tries to perform an operation on a closed statement, what necessarily throws an exception in JDBC driver). Also, could you specify the versions you used and if you made some specific configurations or changes on the Liquibase side (where did you override the Simba driver for example)? I noticed Also, regarding the compliance mode, it has been introduced with the help of @mjok (see #8) to adapt some behaviours to be compatible with Finally, to answer your last question: yes, I know at least one project using it in production (but not with Liquibase). The JDBC wrapper as also been tested several times to connect to a Cassandra database with DBeaver Community Edition for example. Unfortunately, I don't know all the potential applications using it. 😉 This project is still in development but now implements a large part of JDBC API (at least for the specifications compatible with a NoSQL database such as Cassandra). |
Hello @bjornph, I was able to reproduce the issue by rebuilding I found the cause of the issue: closing the result set mistakenly was closing the statement. After fixing this (locally for now), I was able to successfully run the commands
However, I'm still facing an issue when running the command
I identified the root cause of this new issue as an SQL exception "Method was called on a closed ResultSet." when the method I continue to investigate this. |
- fix result sets and statements closing. - introduce a new behaviour in Liquibase compliance mode to run multiple queries in the same statement synchronously (by default, they are executed asynchronously). - return the schema name instead of null when the method CassandraConnection.getCatalog() is called in Liquibase compliance mode. - does not throw SQLFeatureNotSupportedException when CassandraConnection.rollback() is called in Liquibase compliance mode.
- fix result sets and statements closing. - introduce a new behaviour in Liquibase compliance mode to run multiple queries in the same statement synchronously (by default, they are executed asynchronously). - return the schema name instead of null when the method CassandraConnection.getCatalog() is called in Liquibase compliance mode. - does not throw SQLFeatureNotSupportedException when CassandraConnection.rollback() is called in Liquibase compliance mode.
Hello @bjornph, I finally fixed all the issues preventing to use this wrapper with Liquibase and I published a new version (4.9.1). I was able to successfully execute the basic example provided in the
And if I query my Cassandra database, the script is correctly executed:
Please note that this only works if the following prerequisites are met:
|
@maximevw Wow! I was about to post the setup to recreate it, but you beat me to it, and solved the root problem as well! Thank you very much. I think this will be a good alternative to the simba driver due to the uncertainties wrt. licensing. |
- fix result sets and statements closing. - introduce a new behaviour in Liquibase compliance mode to run multiple queries in the same statement synchronously (by default, they are executed asynchronously). - return the schema name instead of null when the method CassandraConnection.getCatalog() is called in Liquibase compliance mode. - does not throw SQLFeatureNotSupportedException when CassandraConnection.rollback() is called in Liquibase compliance mode.
- fix result sets and statements closing. - introduce a new behaviour in Liquibase compliance mode to run multiple queries in the same statement synchronously (by default, they are executed asynchronously). - return the schema name instead of null when the method CassandraConnection.getCatalog() is called in Liquibase compliance mode. - does not throw SQLFeatureNotSupportedException when CassandraConnection.rollback() is called in Liquibase compliance mode.
Hi, I tested this for use with Cassandra liquibase. It installs, but fails on a dummy project. See my post here
liquibase.exception.DatabaseException: Error executing SQL SELECT COUNT(*) FROM liquibase.DATABASECHANGELOGLOCK: Method was called on a closed Statement.
I did have the compliancemode turned on (the keyspace is also called liquibase:
"jdbc:cassandra://<URL>/liquibase?localdatacenter=cassandra&compliancemode=Liquibase"
)Is this used in production anywhere? I couldn't make sense of the databasechangeloglock error
The text was updated successfully, but these errors were encountered: