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

Cassandra JDBC Driver is in lib folder despite of license restrictions #148

Open
cziberez opened this issue Jul 29, 2022 · 6 comments
Open

Comments

@cziberez
Copy link

cziberez commented Jul 29, 2022

Hello,

I just saw this pull request recently #146 which added CassandraJDBC42.jar to your lib folder despite it has a license restriction which says:

Licensed Software is confidential and copyrighted. Except as expressly permitted under this Agreement, you agree not to assign, distribute, transfer, lease, disassemble, decompile, reverse engineer, modify, or create derivative works of the Licensed Software, in whole or in part, or permit or authorize a third party to do so.
--
https://www.datastax.com/legal/simba-odbcjdbc-driver-license-terms

So I would like to ask if this is completely okay? Is liquibase has the right to distribute this driver or is it just a misunderstanding and a wrong commit?

PS: I just found the original Documentation which says:

To use Liquibase and Apache Cassandra, you need two JAR files: a JDBC driver and the Liquibase Cassandra extension:
Download the Simba JDBC driver JAR file and select Simba JDBC Driver for Apache Cassandra from the dropdown menu. Select the default package option unless you need a specific package. The driver downloads as a ZIP file named SimbaCassandraJDBC42-x.x.x.zip.
Extract the CassandraJDBCxx.jar file and place it in the liquibase/lib directory.

Thanks in advance.

@kiranvaddadi
Copy link

It looks like there is a hard dependency on Simba JDBC lib. Tried to use different JDBC driver and it failed.

import com.simba.cassandra.jdbc.jdbc42.S42Connection;

@bjornph
Copy link

bjornph commented Aug 25, 2023

@kiranvaddadi @cziberez Did you ever find this out? I am facing the excact same problem. Now, it seems Datastax also has removed the JDBC driver from download. I tried using https://github.com/ing-bank/cassandra-jdbc-wrapper but the dependency for the simba-driver came up.

@APIM-KiranVaddadi
Copy link

@bjornph No. I have tried the ing-bank driver by overriding the service. But the wrapper is a partial impl of the JDBC spec and hence got into some other issues.

End of the day, liquibase is for relational db (jdbc) and cassandra is not.

https://github.com/liquibase/liquibase-cassandra/blob/2472b9fa9adea5ea3b13dbd9e596458a865d1371/src/main/resources/META-INF/services/liquibase.database.Database

@bjornph
Copy link

bjornph commented Aug 26, 2023

@APIM-KiranVaddadi I tried the same thing with overriding the hard dependency and use ing jdbc wrapper, with the liquibase compliancemode. It runs, but fails a simple project with
liquibase.exception.DatabaseException: Error executing SQL SELECT COUNT(*) FROM liquibase.DATABASECHANGELOGLOCK: Method was called on a closed Statement.

I see that Datagrip has a cassandra-jdbc-driver as well, but I have not tried it.

Not sure on the details of the licensing on the attached driver to this repo that @cziberez mentions though.

I would've guessed that with Cassandra being a popular DB, there would be multiple possibilities for schema change tools.

@maximevw
Copy link
Contributor

maximevw commented Sep 3, 2023

Hello,

As explained here: ing-bank/cassandra-jdbc-wrapper#25 (comment), a new version of Cassandra JDBC wrapper has been published fixing some issues preventing it to work correctly with Liquibase.

To use it, some prerequisites must be met:

  • the liquibase-cassandra jar must be modified to use the version 4.9.1 of Cassandra JDBC wrapper instead of Simba JDBC driver: see the changes in the pull request Swapped in the new ING JDBC wrapper and the DataStax OSS Driver #205 for example.
  • the compliance mode Liquibase must be set in the JDBC URL.
  • I also recommend to increase the value of the parameter requesttimeout in the JDBC URL (default value is 2 seconds), especially if you use a CQL script as Liquibase changelog: indeed, the script is considered as a single statement and if it contains a lot of queries, it could take more than 2 seconds in some circumstances.

Regarding the Datagrip implementation, it's (at least for now) a partial implementation of the JDBC API (for example, most of the methods in the DatabaseMetaData implementation return null). I don't know the real impact on the operation of Liquibase but I know that methods such as DatabaseMetaData.getColumns() are used in some Liquibase commands but I didn't deep dive into it to know what will be the result with a call returning null in this case...

@maximevw
Copy link
Contributor

Maybe this can be closed with the release of the version 4.25.0? I think all the issues are now solved. :)
Note I created a PR here to update the documentation: liquibase/liquibase-contribute-site#52

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

5 participants