Documentation not explaining how to obtain the CqlSession object (for Cassandra integration)
See original GitHub issueThanks for this great project. I’m successfully using it with PostgreSQL already. 👍
However, I don’t get it to work with Cassandra, because I can not obtain the needed CqlSession
object.
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.datastax.oss.driver.api.core.CqlSession' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
The minimal example in the docs does not state how to get it.
@Bean
public CassandraLockProvider lockProvider(CqlSession cqlSession) {
return new CassandraLockProvider(cqlSession);
}
Here is a full minimal example (using Kotlin) to reproduce the issue: https://gist.github.com/Dobiasd/ac1429ad403c5480ea05fb11f9a53959
It would be cool if we documentation could be extended such that it explains how to get the CqlSession
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
DataStax Java Driver - Core driver
CqlSession is the main entry point of the driver. It holds the known state of the actual Cassandra cluster, and is what you...
Read more >Using the Cassandra Client - Quarkus
This quickstart guide shows how to build a REST application using the Cassandra Quarkus extension, which allows you to connect to an Apache...
Read more >A Guide to Cassandra with Java - Baeldung
This tutorial is an introductory guide to the Apache Cassandra database using Java. You will find key concepts explained, along with a ...
Read more >Spring Data for Apache Cassandra - Reference Documentation
It explains Cassandra module concepts and semantics and the syntax for various ... CqlSession object by using the Spring IoC container.
Read more >cassandra-migration/README.md at master_v4 - GitHub
As the Cluster class has been removed by Datastax you have to pass a CqlSession instance into the Database object. You should not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you’re using the proper Spring Boot version, it should be. I’ve commented your SO question.
Thanks, that should suffice to save some time for future users like me. 👍