Questions tagged [spring-data-couchbase]
Spring Data Couchbase project provides Spring Developers a POJO centric model for interacting with documents stored in Couchbase.
380
questions
0
votes
1
answer
37
views
org.springframework.dao.InvalidDataAccessApiUsageException: Required property docTypeVersion not found for class java.util.Optional
When i try to select some part of couchbase document using a dto class,getting this error.
I tried several possible solutions like changing return type of query method Optional<ResponseDto> and ...
1
vote
1
answer
34
views
Couchbase execute query index scan timed out
I got the following exception when CouchbaseTemplate.findByN1QLProjection() was executed. Is there any way to increase the index scan timed out period?
Exception in thread "main" org....
2
votes
1
answer
41
views
How to sort documents by value of json object in couchbase query?
I have the below kind of data stored in my collection called persons, I am using spring-data-couchbase for reading this data in Java POJOs, and I am using the @Query annotation in my PersonsRepository ...
2
votes
2
answers
51
views
how to write a nested couchbase query which returns count and list of objects in spring data couchbase reactive?
I have below query written in my spring data reactive couchbase repository class using @Query annotation
WITH subquery1 AS (
SELECT COUNT(*) AS total_count
FROM bucketName
WHERE condition1
),
...
1
vote
0
answers
23
views
Couchbase Testing latency of replicated data
Consider the following scenario:
I have got a couchbase database installed in 3 different clusters. As you may know, couchbase db offers seamless selfreplication between clusters.
I would like to know,...
1
vote
1
answer
79
views
Spring Data Couchbase Version Compatibility with Spring Boot
We plan to upgrade Spring Data Couchbase to 5.1.0 in our Spring Boot project. However we couldn't find any information if 5.X version is compatible with Spring Boot 2.7.X.
Does Spring Data Couchbase ...
0
votes
1
answer
22
views
Documents bulk inserted with Couchbase Web not showing up in REST API response Java
I have a Couchbase cluster running with a bucket and scope created, when importing json objects as json list on webconsole, I can retrieve documents via Couchase web console. But the same documents ...
0
votes
0
answers
27
views
Is there any tool available to generate ER diagrams based on couchbase buckets
Is there any tool available to generate ER diagrams based on couchbase buckets
By using model calsses or couchbase GUI also fine
@Document
@JsonInclude(JsonInclude.Include.NON_NULL)
public class A{
...
2
votes
1
answer
44
views
SpringDataCouchbase - Not able to save map with collection as value
Tried to save Person entity with below attributes in couch base, but not able to save getting error, see below error log.
Note: Issue in Spring boot 3.X onwards, Spring-data -couch 5.X onwards not ...
0
votes
1
answer
46
views
Couchbase DB Join Query Performance
I am trying to optimize a join query which is taking more time when the offset increases. Your suggestions will be helpful.
SELECT *
FROM document_1 AS doc_1
JOIN document_1 AS doc_2
ON ...
1
vote
1
answer
38
views
Multiple couchbase cluster configuration in single springboot project
I have been trying to configure 2 different couchbase cluster(not bucket) by extending AbstractCouchbaseConfiguration abstract class as follow:
@Configuration
@EnableCouchbaseRepositories("com....
2
votes
1
answer
67
views
Java thread that upserts document in Couchbase is stuck in Waiting state indefinitely
Spring Boot Version: 2.3.1.RELEASE
Spring Data Couchbase: 4.3.5
Couchbase Java Client: 3.2.7
My spring boot application is getting stuck after inserting a document in Couchbase. (I can see document ...
1
vote
0
answers
311
views
Couchbase client is trying to connect to localhost while configured to connect to remote server
My application is spring boot based trying to connect to Couchbase using spring-data-couchbase, which opens a bucket on remote Couchbase 7.1.1 EE server and inserts a document.
Spring Boot Version: 2....
0
votes
2
answers
120
views
How to connect to couchbase databse using spring data couchbase and yaml properties?
I am using spring-data-couchbase in my spring boot application to connect to couchbase database and using application.ymal file to configure all the data source. What is connection string for ...
0
votes
1
answer
57
views
how to find out which sdk version spring-data-couchbase uses internally in spring boor application?
I am using spring-data-couchbase jar to connect to Couchbase db from spring boot application. Now I want to know which sdk version my spring-data-couchbase using ? whether it's sdk2.x or sdk3.x?
0
votes
1
answer
156
views
which version of spring data couchbase is compatible with sdk 3.x?
My project is on spring boot version 1.5.20.relaease and spring-data-couchbase version is 2.2.20.release. I want to move to sdk 3 then which version of spring boot and spring-data-couchbase I should ...
1
vote
1
answer
142
views
Compare two flux
When I try to compare two flux obtained from reactive couchbase repository facing timeout issue. I am trying to get all the cars from vehicle collection.
Flux<Vehicles> vehicles = vehicleRepo....
1
vote
1
answer
69
views
Define Couchbase collection name based on property
I have the below Repository that extends CrudRepository. Now based on a property called "scopeName", we need to inject the collection name using @Collection("collectionName").
So ...
0
votes
1
answer
41
views
How to handle field injection to Couchbase repository
In order to add functionality to the couchbase repository I implemented the below class.
Inside this class is another @componenet name extensionHelper. Since this class is not standard spring bean I ...
1
vote
1
answer
82
views
Upsert Document with a generic json field
Using spring-data-couchbase I want to define a document with a field settings with generic JSON. To do this, I create a class
@Document
public class SampleDoc {
@Id
@NotNull
protected String id;
...
1
vote
1
answer
44
views
getting permission denied error while executing N1QL query on couchbase 7.1 if result set is big
I am executing following query statement whose result set contains 10000 documents, while running the query I get permission denied error. If the result sets are small then this error does not come.
...
1
vote
1
answer
175
views
How to flush collection in couchbase
The way we have flush operation for buckets can we also do similar for collection in couchbase?
is there any alternate to drop and recreate the collection if we want to delete all data from the ...
1
vote
2
answers
243
views
Enable Debug Logs for Couchbase SDK with spring boot
I am using Couchbase SDK along with Spring boot 2.6.x version. I am using the spring spring-data-couchbase:jar:4.4.0 which in turn has com.couchbase.client:java-client:jar:3.3.0 dependency. The issue, ...
0
votes
0
answers
46
views
Why couchbase.client.java.query.dsl.Expression not working in in SDK3?
When migrating from Couchbase SDK 2 to SDK 3 certain document formats seem to have been removed. How can this format or an alternative output be used in Couchbase SDK 3 to handle the below-indicated ...
1
vote
1
answer
60
views
What are the solutions for findByN1QL in SDK3?
When migrating from Couchbase SDK 2 to SDK 3 certain document formats seem to have been removed.
How can this format or an alternative output be used in Couchbase SDK 3 to handle the below-indicated ...
1
vote
1
answer
103
views
How to resolve getCouchbaseOperations() related dependencies using Spring Data Couchbase (version 4.4.5)
Spring Data Couchbase documentation (version 4.4.5) specifies that the method getCouchbaseOperations() has also been removed. It also states that you still can access all methods from the native Java ...
1
vote
2
answers
99
views
is There alternate of counter method in spring-boot-starter-data-couchbase?
i am migrating Spring boot version. in latest spring boot version 2.6.0 in spring-boot-starter-data-couchbase counter() method have been removed. i need increment operation. Before in couchbase 2.2.5....
0
votes
2
answers
202
views
Issue with integration test for spring boot with couchdb
I'm pretty new to couchbase but fair experienced with spring boot. I have the following:
Repository:
import entity.Building;
import org.springframework.data.couchbase.repository.Collection;
import org....
2
votes
2
answers
219
views
Update Couchbase documents without overwriting @Created fields with Spring Data Auditing
I have a Couchbase document for which I'd like to enable auditing:
@Document(expiry = 0, expiryUnit = TimeUnit.DAYS, touchOnRead = true)
public class Entity {
@Id
@GeneratedValue(strategy = ...
1
vote
1
answer
212
views
How to handle Couchbase SDK 2 based JsonDocument format usage when migrating to Couchbase SDK 3?
When migrating from Couchbase SDK 2 to SDK 3 certain document formats seem to have been removed. Our current development which was based on Couchbase SDK 2, has extensively used the JsonDocument ...
1
vote
1
answer
117
views
What is the version compatibility for spring boot with Couchbase 6.6?
I am trying to connect to Couchbase server 6.6 using Spring Boot application and I want to use username and password to connect to Couchbase server. Which Spring boot version is compatible for this ? ...
2
votes
2
answers
237
views
What are the solutions for com.couchbase.client.java.query.dsl.Sort issue?
This is one of error getting class,
import com.bookingsite.acme.config.document.paymentoption.PaymentGatewayConfiguration;
import com.bookingsite.acme.config.dto.paymentgatewaysearchrequest....
2
votes
1
answer
286
views
Why @Query annotation not working to SpringBoot Version 2.7.4 CouchbaseRepository?
I Upgraded Project to SpringBoot Version 2.2.0.RELEASE to 2.7.4.This is the example Repository Interface.
import com.flyaero.aeromasterapiservice.data.AddLanguageRequest;
import org.springframework....
1
vote
1
answer
101
views
How to replicate the functionality of remove a document from a CouchBase DB Bucket identified by its ID in Spring Boot?
We are currently using Spring Boot 2.2.13 version with java 1.8-based dependencies. We are upgrading to Spring Boot version 2.7.3. with Java 17 support.
The current development uses CouchbaseClient.In ...
1
vote
0
answers
296
views
How to perform Spring Boot version upgrade in an application which uses Couchbase functionality
We are currently using Spring Boot 2.2.13 version with java 1.8-based dependencies.
We have been requested to upgrade to Spring Boot version 2.7.3. with Java 11 or if possible Java 17 support.
we are ...
3
votes
1
answer
155
views
How can I pass a value from application.properties in @Scope and @Collection annotations?
I want to prepare for a migration from Couchbase 6.X to 7.X. For this, I want to configure the scope and collection for my cluster. In the documentation of spring-data-couchbase, I saw that I just ...
0
votes
1
answer
30
views
Spring Batch CouchBase bulk read opration
I am using spring batch and and my database is Couchbase. Is there any way to read documents from Couchbase in batch or in bulk mode?
1
vote
1
answer
223
views
How to perform Full Text Search in Couchbase using Spring Data Repository
I have created a full-text search index for my bucket and I am able to use it in web UI and get some search results. Still, I can't find an appropriate example of how to create a repository or method ...
2
votes
2
answers
315
views
How to search by field in embeded list of objects using Spring repository for Couchbase
I have following User Document:
@Document
@Data
public class User {
@Id
@GeneratedValue(strategy = GenerationStrategy.UNIQUE)
private String id;
@Field
private String email;
...
1
vote
0
answers
74
views
Couchbase attempt context transaction not working as expected
When there are multiple requests for updating same document in a AttemptContext transaction block, data becomes inconsistent because of concurrent threads trying to update the document. Also a warning ...
1
vote
1
answer
123
views
Unable to read Map<String,Object> field from couchbase using spring data couchbase
Facing issue while loading document with Map<String,Object> type in my model.
protected Map<String, Object> attributes;
while loading data from couchbase getting Basic type must not be ...
1
vote
0
answers
171
views
Spring Data couchbase find by subdocument Element
I have this model:
public class Person {
@Id
String id;
@Field
Address address;
}
public class Address {
@Id
String id;
@Field
String contry;
//..
}
I Use this repositry with the N1QL query it'...
0
votes
2
answers
589
views
Consider defining a bean named 'couchbaseRepositoryOperationsMapping' in your configuration. Spring Boot
Any help appreciated !
I have a spring boot application to be connected to couchbase with following details
Repository interface
@Repository
public interface UserRepository extends ...
1
vote
1
answer
175
views
how to save documents to multiple buckets in reactive couchbase world
I am trying to load multiple buckets which is working fine using below code:
@Configuration
@EnableReactiveCouchbaseRepositories("com.abc.couchbase.repositories")
class ...
1
vote
1
answer
525
views
How to query couchbase with multiple values using spring-data-couchbase
Hi I have an endpoint like /findBy and it can take several query params similar like ;
findBy?color="blue"&size="big"&city="ny"&country="usa"
How ...
1
vote
2
answers
90
views
How to write a join query which accepts placeholders (query params) using couchbasetemplate from Spring Data Couchbase 4.X version
I need to get a set of data from 2 collections.
Employee
{"id":"1234",
"name":"Smith"}
Salary{
"employeeId":"1234",
"Salary":&...
0
votes
1
answer
220
views
search on multiple fields in couchbase spring data where all fields are not passed
I need to write filtering method based on county/status/symbol.
my repository query looks like this
@Query("#{#n1ql.selectEntity} WHERE `platform`='FXSERVICE' " +
"AND `...
1
vote
1
answer
368
views
How to fetch a list from document using n1ql with spring-data-couchbase
I want to fetch actions list in user class by username with this query but its not working
@Repository
public interface IUserRepository extends CouchbaseRepository<User,Long> {
@Query("...
2
votes
1
answer
985
views
Connecting to multiple buckets on Couchbase cluster with Spring
in my project I have a Couchbase cluster. I also have different buckets for different datas. I want to configure them in CouchbaseConfiguration file as it is specified inDocumentation but I got ...
1
vote
1
answer
307
views
SpringBoot CouchbaseTemplate: findbyId is working But findByQuery not
Can anyone help me to undersand:
In Spring Data Couchbase: spring-data-couchbase : 4.3.0
Couchbase Version: 6.6.2
By using couchbasetemplate
findById(Entity.class).one(id) is working fine, I am able ...