spring-data-cassandra

Spring-data-cassandra: Error creating bean with name 'sessionFactory' and Cannot resolve reference to bean 'cassandraTemplate'

喜你入骨 提交于 2020-07-10 08:34:11
问题 I have a springboot app, in which I am connecting to cassandra DB. My pom.xml: parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.6.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-cassandra</artifactId> </dependency> The cassandraConfig definitition: @Configuration @PropertySource("file:///Users

Spring-Data-Elastic Search and Spring-Data-Cassandra Having Issues with MapId

谁说胖子不能爱 提交于 2020-03-03 07:45:06
问题 I am trying to have Spring-Data-Cassandra and Spring-Data-Elasticsearch work together. Below is the problem which I am facing. org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.format.support.FormattingConversionService]: Factory method 'mvcConversionService' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'personRepository': Invocation of init method failed; nested

What is the default consistency level in spring-data-cassandra?

*爱你&永不变心* 提交于 2020-02-24 11:21:15
问题 If I don't set any read/write consistency level at all in my spring-data-cassandra project, what will be my consistency level for reads? What about writes? (I asked this question here, but the Google Group is now locked) 回答1: The default consistency level used by the driver, if not set, is one. Since spring-data-cassandra, as they claim is: Based on the latest DataStax Enterprise CQL Java Driver the default CL is one. 回答2: See https://jira.spring.io/browse/DATACASS-145 & https://jira.spring

Multiple keyspace support for spring-data-cassandra repositories?

筅森魡賤 提交于 2020-01-22 09:57:13
问题 Does Spring Data Cassandra support multiple keyspace repositories in the same application context? I am setting up the cassandra spring data configuration using the following JavaConfig class @Configuration @EnableCassandraRepositories(basePackages = "com.blah.repository") public class CassandraConfig extends AbstractCassandraConfiguration { @Override public String getKeyspaceName() { return "keyspace1"; } I tried creating a second configuration class after moving the repository classes to a

Unable to connect to cassandra from Docker container using spring-data-cassandra: NoHostAvailableException: All host(s) tried for query failed

折月煮酒 提交于 2020-01-15 10:48:07
问题 I am using spring-data-cassandra to connect to our cassandra db which is in aws cluster . Using CassandraTemplate I am able to connect locally and get the data but while deploying application in docker container I am getting below error UnsatisfiedDependencyException: Error creating bean with name 'cassandraTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfiguration.class]: Unsatisfied dependency expressed through method

Spring-Data-Cassandra causes XSD validation error using XML configuration

匆匆过客 提交于 2020-01-13 06:31:06
问题 Heyy hello, I have some kind of error that won't affect on my project's compilation,deployment and running But it shows red mark at my configuration file for Spring-data-Cassandra also shows problem in problems menu. Can any one please tell what's the issue? I have seen same question related to spring-data-JPA and Spring-data-* but they are not helping so I am posting this one. here is error message:- The errors below were detected when validating the file "spring-tool.xsd" via the file

How to configure neo4j and cassandra repositories in same spring boot application

点点圈 提交于 2020-01-11 12:35:24
问题 I have configured neo4j and cassandra repositories separately with spring boot using spring-data. However, when I try to use two repositories in the same projects it doesn't work as expected. This is my folder structure. -----org.test.project -----controller BarController FooController -----models -----dao -----cassandra BarDAO FooDAO -----neo4j BarDAO FooDAO -----repositories -----cassandra BarRepository FooRepository -----neo BarRepository FooRepository -----services CassandraService (Has

Using Spring Batch to write to a Cassandra Database

孤街浪徒 提交于 2020-01-11 03:39:37
问题 As of now, I'm able to connect to Cassandra via the following code: import com.datastax.driver.core.Cluster; import com.datastax.driver.core.Session; public static Session connection() { Cluster cluster = Cluster.builder() .addContactPoints("IP1", "IP2") .withCredentials("user", "password") .withSSL() .build(); Session session = null; try { session = cluster.connect("database_name"); session.execute("CQL Statement"); } finally { IOUtils.closeQuietly(session); IOUtils.closeQuietly(cluster); }