Questions tagged [spring-data-couchbase]

Spring Data Couchbase project provides Spring Developers a POJO centric model for interacting with documents stored in Couchbase.

Developers use a Repository style data access pattern and Spring Data Couchbase adds query derivation based on N1QL (a superset of SQL), support for Spring configuration of the database client, and the ability to support the @Cacheable annotation building on the Spring Cache project.

Resources

Related tags

380 questions
10
votes
1 answer

Prevent Spring Boot startup failure on couchbase connection error

Using a combination of Spring Boot 1.4.1.Release and Spring Data Couchbase 2.1.3.RELEASE, is there a way to prevent application startup failure if it cannot connect to couchbase? Current behavior: Application cannot connect to couchbase on startup…
10
votes
2 answers

Is there spring-data for CouchDB?

Can Spring-data be used with CouchDB? I know there is a community project Spring-Data-Couchbase but is that compatible with CouchDB or does it only work with Couchbase? If not, is there a CouchDB version of Spring-data? Or am I unable to use…
Eric B.
  • 23,425
  • 50
  • 169
  • 316
9
votes
1 answer

Unit & Integration Testing with Couchbase

I recently setup a new project that is using Spring-Data-Couchbase and I am completely stumped on how I should approach unit and integration testing here. Typically with JPA I can mock out my Repository somehow (assuming this is similar for…
Matthew Fontana
  • 3,790
  • 2
  • 30
  • 50
7
votes
2 answers

Generic type to repository for couchbase using spring boot

I'm creating an utility in Spring Boot to connect and insert/upsert data into the couchbase in the more generic way possible. I have something like this: public interface GenericRepository extends CouchbaseRepository { } Where I…
Fabio Cardoso
  • 1,181
  • 1
  • 14
  • 37
7
votes
4 answers

How to use spring data with couchbase without _class attribute

Is there a simple way to use spring data couchbase with documents that do not have _class attribute? In the couchbase I have something like this in my sampledata bucket: { "username" : "alice", "created" : 1473292800000, "data" : { "a": 1,…
Milan
  • 265
  • 1
  • 5
  • 13
7
votes
5 answers

Spring Data Couchbase: Automatic ID generation

I'm setting up a Document with the @Id annotation and in my tests I get a MappingException because the Id is not set when creating a new document. Is spring-data + couchbase unable to automatically assign an ID for new documents?
user2722238
  • 241
  • 1
  • 4
  • 7
6
votes
0 answers

ConnectTimeoutException when trying to connect to Couchbase bucket from Spring Data Couchbase using SSL

I am trying to use Spring Data Couchbase to connect to Couchbase server using SSL certificates. I believe the certificate is configured correctly and can log in to the bucket using CertAuth but I am then seeing a strange ConnectTimeoutException. In…
Daniel Western
  • 141
  • 1
  • 5
5
votes
6 answers

javax validation does not validate notNull

I have a springBoot 2.1.9.RELEASE application that uses Spring Data for Couchbase I have this object @Data @AllArgsConstructor @NoArgsConstructor public class Hostel { @NotNull @JsonProperty("_location") private T location; } and…
Sandro Rey
  • 2,429
  • 13
  • 36
  • 80
5
votes
2 answers

Couchbase 6.0 + springboot (InvalidPasswordException)

Hi i am newbie to Couchbase and created a Springboot application with Couchbase 6.0. When i installed Couchbase, it asked me to create username and password and i set username="admin" and password="password" and then i created "student" bucket. I…
Bifrost
  • 417
  • 5
  • 23
5
votes
2 answers

How to capture save or update events in Couchbase

I would like to be able to do some data manipulation when documents are updated or created in Couchbase. Documents can arrive in our database either via Sync Gateway or our own code which streams data in from an http service. It would be great to…
Simbosan
  • 244
  • 2
  • 11
5
votes
2 answers

How to exclude classes that are added using Spring's AutoConfiguration when using @WebMvcTest?

I want to test my Controller using @WebMvcTest and mock the dependencies, but Spring Boot's AutoConfiguration loads my Couchbase (Spring Data) configuration automatically. Couchbase is not available on some platforms which run the test, so the Test…
janb
  • 1,057
  • 1
  • 9
  • 11
5
votes
2 answers

Couchbase uses wrong indexes with N1QL parameterized queries

I have problems with understanding of way couchbase query plan works. I use SpringData with Couchbase 4.1 and I provide custom implementation of Couchbase Repository. Inside my custom implememtnation of Couchbase Repository I have below…
5
votes
1 answer

Use Spring Data Couchbase to connect to different Couchbase clusters

I'm looking for a way to use Spring Data Couchbase to connect to two separate Couchbase clusters. Looking at the documentation and the implementation, it is not clear as how to do this and my concern is that there will be bean name conflicts if have…
loesak
  • 1,413
  • 2
  • 19
  • 33
5
votes
0 answers

No Mapping metadata found

Caused by: org.springframework.data.mapping.model.MappingException: No mapping metadata found for java.lang.Object at org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter.read(MappingCouchbaseConverter.java:140) I am…
ZHandley
  • 51
  • 2
5
votes
5 answers

How to set couchbase operation timeout in spring data couchbase?

I have a simple spring project which try to retrieve a document from couchbase using spring-data-couchbase. I have configured the config by extending AbstractCouchbaseConfiguration. Everything works perfectly fine. Since I use couchbase as a cache,…
Aris
  • 77
  • 1
  • 6
1
2 3
25 26