Questions tagged [spring-data-cassandra]

Spring Data for Cassandra is part of Spring Data project which provides a familiar and consistent Spring-based programming model for new datastores while retaining store-specific features and capabilities. The Spring Data Cassandra project provides integration with Cassandra Columnar NoSQL Datastore

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

How do I properly fail a validation of spring data cassandra using jakarta validations when passed to controller?

I have the following... @Column @ContactInfo private String contactInfo; ... private static final String EMAIL_PATTERN = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$"; @Override ...
Jackie's user avatar
  • 22.3k
-2 votes
0 answers
25 views

Docker compose : Cassandra not connecting to my spring app in same network

My application is dep on Cassandra, so i have put all of them in a docker-compose file, now simply using plain docker as given here i'm able to run it fine locally but when i try using the same ...
Ivan Didichenko's user avatar
0 votes
1 answer
42 views

Cannot write to table with UDT, getting "Cannot resolve UserDefinedType for [devices]"

These are the dependencies I have installed in my spring project //cassandra implementation 'org.springframework.data:spring-data-cassandra:3.1.2' implementation 'io.projectreactor:reactor-core' ...
Deep Kiran's user avatar
1 vote
1 answer
36 views

Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'

I am using spring boot to connect to Cassandra Database.I am getting an error at startup that says Error creating bean with name 'abcItemsRepository' defined in com.myspace.mycompany.repository ...
Omprakash's user avatar
1 vote
0 answers
64 views

Docker compose : Cassandra not connecting to my application in same network

My application is dependent on Cassandra DB, so i have put all of them in a docker-compose file, now simply using plain docker as given here i'm able to run it fine locally but when i try using the ...
Akash Jain's user avatar
0 votes
1 answer
26 views

Spring data cassandra reactive batch operation fails when ttl is set

Im using reactiveCassandraTemplate.batchOps() to insert multiple entities but Codec not found for requested operation: [null <-> org.springframework.data.cassandra.core.cql....
Milad Amery's user avatar
0 votes
0 answers
11 views

Connecting to Astra DB from pure Spring app, No Spring boot

I have a spring app (no Spring Boot) which is using spring data cassandra for data access. I want to use reactive version of spring data cassandra and connect to Data stax Astra DB. connecting to ...
Milad Amery's user avatar
0 votes
1 answer
28 views

Cant connect to Cassandra from Spring Boot Application

Currently cracking my head over this error with Cassandra: Error creating bean with name 'cassandraSession' defined in class path resource [com/project/config/CassandraConfiguration.class]: Invocation ...
Doolan's user avatar
  • 1,333
0 votes
0 answers
20 views

Selecting specific columns for CassandraRepository dynamically as per GrapqhQl query's return fields

For the following graphql request: query{testInput(testQueryInput:{xyz:"test"}){ list{ field1 field2 . . } } } I am using ...
Soumav's user avatar
  • 385
2 votes
1 answer
77 views

Is there any way to use reactive cassandra repository with Pageable in Spring Boot?

I am trying to use ReactiveCassandraRepository interface for my repository. When I tried to add findAll method like this: public interface MatchRepository extends ReactiveCassandraRepository<Match, ...
karakale's user avatar
  • 146
0 votes
1 answer
82 views

Configuring two different database - Postgres SQL and cassandra Db in Spring boot

In our application, the DB is configuration done using Spring boot starter JPA and application.properties - spring.datasource.url= postgres spring.datasource.username=username spring.datasource....
vikash singh's user avatar
  • 1,489
0 votes
0 answers
21 views

What is the benefit of using CqlTemplate vs CassandraTemplate?

I would like to know what the benefits are using CqlTemplate vs CassandraTemplate? I am aware that CassandraTemplate allows for object mapping. But is there anything more? How do they handle batching? ...
778899's user avatar
  • 9
0 votes
1 answer
114 views

Facing java.nio.charset.MalformedInputException : Input length = 1 - with Spring Data Cassandra and Amazon Keyspace,How to Resolve?

I am facing an issue while making a query to retrieve data (approximately 2000 rows) from a specific table ( it works for other entities and i have 50+ tables ); I receive a 500 error. What is ...
Quentin GORAK's user avatar
0 votes
2 answers
75 views

Spring app returns CassandraConnectionFailureException due to NoNodeAvailableException: No node was available to execute the query

We have added 1 more dc to existing cluster. Application was deployed in each region separately. After adding the DC & region wise application deployment, We started seeing the below exception ...
Manikar Rangu's user avatar
0 votes
1 answer
87 views

Connect to Cassandra with dynamic, rotating credentials from Spring vault

Im working on a project that uses Spring Data Cassandra (for simplicity, “SDC” from now on) and we have been working on the integration with Spring Vault so we can generate dynamic credentials and ...
alb3rtobr's user avatar
  • 311
0 votes
1 answer
82 views

Spring Batch 5 with Cassandra DB

Sorry I'm totally new to "Spring Batch". My requirement is , I need to create Spring Batch 5 project which reads rows from cassandra db (Lest say records of particular status in a table), ...
Ramprakash's user avatar
0 votes
0 answers
48 views

Use RetryPolicy with spring-data-cassandra version 3.2.8

I am new to spring-data-cassandra working on a simple project that has CRUD operations. But facing problems while setting RetryPolicy. I have used CassandraRepository for Person table which contains ...
Rohan Deshmukh's user avatar
1 vote
1 answer
125 views

spring data Cassandra LIKE query on secondary indexed cluster column

Java Version: openjdk version "20" 2023-03-21 OpenJDK Runtime Environment (build 20+37) OpenJDK 64-Bit Server VM (build 20+37, mixed mode, sharing) Springboot Version: 3.0.1 Cassandra ...
Prafulla Kumar Sahu's user avatar
0 votes
1 answer
128 views

Spring-data-reactive-cassandra deleteById have no impact

Java: 20.0.0 Springboot: 3.0.1 Cassandra: 4.0 public interface UserRepository extends ReactiveCassandraRepository<User, UUID> { } method call @Service public class UserService { ...
Prafulla Kumar Sahu's user avatar
1 vote
0 answers
38 views

UserDefinedType Cannot be Converted to a UdtValue in Spring Data Cassandra

I want to pass the "address" as a object in postman for the field address, like that: { "orderOfferingDiscount": 0.0, "orderProducts": [ { &...
Victor Cavichioli's user avatar
1 vote
2 answers
191 views

Spring Data Cassandra query returns InvalidQueryException, "unconfigured table"

@Table("person_details") class Person{ @PrimaryKeyColumn(value = "person_id", type = PrimaryKeyType.PARTITIONED) private String personId; @Column(value = "age") ...
Sreekanth P's user avatar
  • 1,197
0 votes
0 answers
95 views

In spring data cassandra updating udf field via update.query results in error

I'm trying to update cassandra nested field (udt) using spring data query API: cql.update(Query.query( Criteria.where(Attachment.Key.MESSAGE_ID).is(5), Criteria.where(...
Pavel Moukhataev's user avatar
0 votes
0 answers
91 views

Spring Data and Cassandra @Query with variable table names

I have a Spring Cassandra entity class as follows: @Builder @Table(value = "#{@environment.getProperty('my.table.name')}") public class UserEntity { @PrimaryKeyColumn(name = "id",...
mang4521's user avatar
  • 772
0 votes
0 answers
103 views

Spring boot, Spring Data JPA with Cassandra | Codec for ZonedDateTime not found

I have a spring boot application and we use Spring Data JPA for querying to our Cassandra DB. We have a timestamp column and currently we are using the LocalDateTime in java to map to the DB column. ...
TheSemicolon's user avatar
0 votes
0 answers
35 views

How to bulk insert in cassandra DB using spring-data

I want to insert 10 million entries in a cassandra DB table. what is the most efficient way of doing it? I tried insertion using scheduler and used multithreading but don't think this is effective at ...
Pradhumn Porwal's user avatar
0 votes
1 answer
94 views

Error connecting to multiple keyspaces in Spring Data Cassandra 4.0.5

Error creating bean with name 'cassandraTemplate' defined in class path resource \ [learn/multiple/database/configuration/SerenoKeyspaceConfig.class]: \ No matching factory method found on class [...
Rahul Sheth's user avatar
1 vote
1 answer
60 views

Unable to access a Cassandra table with a Composite key using Reactive Cassandra

I am using Spring-Reactive and Reactive-Cassandra [spring-boot-starter-data-cassandra-reactive] to access tables on Cassandra. I am able to access simple tables with a single column representing the ...
mang4521's user avatar
  • 772
-1 votes
1 answer
165 views

Cassandra Custom Configuration for Reactive APIs

I have tried various custom configuration for cassandra, but it is not working (my application is not starting up), It works with default autoconfiguration. But as I have to retrieve username and ...
shivakumar pattanashetti's user avatar
0 votes
0 answers
15 views

Should Tables implement Serializable Interface?

I use Spring Boot with Cassandra Database. My Project contains some @Table and @UserDefinedType classes. Should this classes implement Serialiazbale Interface? I use JPA Repositories to interact with ...
Tristate's user avatar
  • 1,526
0 votes
1 answer
25 views

Auto Model Class Generator for Spring Data for Apache Cassandra

Does Spring Data for Apache Cassandra have an CLI or any IDE plugin that can auto generate the model classes by connecting to the existing DB and fetching the schema? Something similar to sequelize-...
Bharath Chandra's user avatar
0 votes
1 answer
68 views

Cassandra page request for an indexed page other than the first page

Java: 19 Springboot: 3.0 Dependency: <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-cassandra</artifactId> </dependency&...
Prafulla Kumar Sahu's user avatar
1 vote
1 answer
243 views

Schema disagreements with Cassandra 4.0 using the Java driver

we have a 3-node dev Cassandra cluster running 3.11.13 that we have upgraded to 4.0.7, and we’ve been basically sending DDL statements through our Java applications using spring-data-cassandra:3.4.6 ...
Kenji Tanaka's user avatar
0 votes
3 answers
1k views

Spring Boot app can't connect to Cassandra cluster, driver returning "AllNodesFailedException: Could not reach any contact point"

i've updated my spring-boot to v3.0.0 and spring-data-cassandra to v4.0.0 which resulted in unable to connect to cassandra cluster which is deployed in stg env and runs on IPv6 address having ...
Vaishnav Puram's user avatar
0 votes
2 answers
198 views

Cassandra Db insertion issue Via springboot

Am trying to insert values into my Cassandra database but am getting this error. Referred to data type mapping here everything seems to be ok... http://itdoc.hitachi.co.jp/manuals/3020/30203V0300e/...
John's user avatar
  • 23
1 vote
0 answers
194 views

Apache Cassandra and Spring - org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type

I am getting the ConverterNotFoundException when trying to save the data in Apache Cassandra using the Spring/Spring Boot application. The following is the complete exception stack trace. Caused by: ...
Prasanna Veeramani's user avatar
0 votes
2 answers
398 views

How to make UUID auto generated in springbok Cassandra app

I am using Java: 19 Springboot: 3.0 Dependency <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-cassandra</artifactId> </...
Prafulla Kumar Sahu's user avatar
0 votes
0 answers
118 views

@Transaction method calling ReactiveCassandraRepository.insert with flux does not rollback all if one element fails

spring-data-cassandra version 3.4.6 spring-boot version 2.7.7 cassandra version 3.11 DataStax Java driver 3.10.0 We have a Controller method POST /all calling a service class with a transactional ...
paskos's user avatar
  • 699
0 votes
1 answer
157 views

Spring in Kotlin, creating Cassandra tables doesn't work

it seems that there might be an issue with annotating data tables with kotlin, it didn't work with jdbc and now it is the same with cassandra. I keep getting this Caused by: org.springframework.data....
Saher Al-Sous's user avatar
5 votes
0 answers
109 views

Spark task fails with java.lang.ClassNotFoundException: com.datastax.spark.connector.rdd.partitioner.CassandraPartition

Am trying to create a spring boot (2.7.5) project that write to Cassandra (using spring data cassandra) and read from Cassandra with spark. It works fine when I provide spark master as local[*] it ...
Nithin Thomas's user avatar
0 votes
1 answer
95 views

Bean of type EntityManagerFactory could not be found

I have the following Repositories: @Repository public interface UserRepository extends CassandraRepository<User, String>, UserFilteringRepository { } public interface UserFilteringRepository { ...
Andrew Orlowski's user avatar
0 votes
1 answer
123 views

Filtering CassandraRepository by multiple fields dynamically

I need to filter on multiple fields of an entity dynamically when searching the CassandraRepository. Specifically, there are multiple String fields of the entity. The user can indicate which (if any) ...
uniqueuser-programmer's user avatar
2 votes
2 answers
325 views

Cassandra Prepared Statements broken after schema migration

I'm preparing statements in the constructor of my repository class, like this PreparedStatement getStatement = cqlSession.prepare(selectFrom("the_table") .all() .whereColumn("the_key&...
Andreas Wederbrand's user avatar
0 votes
1 answer
2k views

Spring Boot failing to connect to Testcontainer Cassandra

I am trying to connect to TestContainer Cassandra on my Spring Boot app, but it fails. I've tried many different approaches, but it seems that it cannot connect. Not sure what or where is the problem. ...
Captain Jacky's user avatar
2 votes
0 answers
139 views

Issue while connecting to Cassandra running in docker from Spring boot application

**application.properties: ** spring.data.cassandra.local-datacenter=datacenter1 spring.data.cassandra.keyspace-name=oboe spring.data.cassandra.contact-points=cassandra spring.data....
user20179738's user avatar
1 vote
1 answer
303 views

Why can Spring Data not find suitable converter for UDT?

I defined a UDT POJO class as follows @Getter @Setter @AllArgsConstructor @NoArgsConstructor @UserDefinedType("address_type") public class Address { @Column("address_line") @...
user avatar
1 vote
1 answer
277 views

Can I use spring data repository interface for cassandra async inserts?

@Repository public interface RoundRepository extends CassandraRepository<Round, String> { List<Round> findByInstanceId(String instanceId, Pageable pageable); Round ...
Saievskiy Dmitriy's user avatar
0 votes
1 answer
1k views

Spring Data Cassandra Exception

I am trying to connect my AstraDatabase (Cassandra) with my spring boot application. I had done all the configuration needed when I used to run it. It shows me exception:Error creating bean with name '...
Ahmad Mujtaba's user avatar
1 vote
1 answer
153 views

Should I use ALLOW FILTERING in Cassandra to delete associated entities in a multi-tenant app?

I have a spring-boot project and I am using Cassandra as database. My application is a tenant based application and all my tables include the tenantId. It is always part of the partition key of all ...
yasak's user avatar
  • 11
1 vote
1 answer
177 views

What do I map varchar type to with Cassandra Java driver 4.13.0?

as part of the Cassandra driver migration, I need to migrate a codec registration like bellow. TupleType tupleType = cluster.getMetadata().newTupleType( DataType.timestamp(), DataType.varchar()); ...
Sreekanth P's user avatar
  • 1,197
0 votes
2 answers
434 views

Filtering with comparing each element of a Flux to a single Mono

I am trying to use a Mono of a username to filter out every element of a Flux (the flux having multiple courses) and I am using Cassandra as backend , here is the schema: CREATE TABLE main....
Kantenburg's user avatar

1
2 3 4 5
13