Questions tagged [spring-data-r2dbc]

Spring Data R2DBC is a module of Spring Data based on R2DBC R2DBC stands for Reactive Relational Database Connectivity.

See https://spring.io/projects/spring-data-r2dbc for more information.

412 questions
0
votes
1 answer

Save only unique elements from Flux<>

I'm pretty new with reactive programming and I have difficulty with understanding how to implement such simple logic as: check if element is existed in database table add element if it's missing So, in my code I have a Flux<> with addresses and I…
iChrome
  • 443
  • 1
  • 6
  • 24
0
votes
0 answers

Communication between Spring boot micro services fail When trying to call from .map

I want to write a Rest API using reactive and achieve the below result. I've 2 microservices for this. Service 1: Receives a post Object and retrieves some data from its database. The process something then communicate to the second Micro Service.…
0
votes
1 answer

R2DBC pool closes all connections before each query

We're using the latest versions of spring-data-r2dbc, r2dbc-pool and r2dbc-postgresql for connecting to a PostgreSQL database using a connection pool. We noticed some high response times, much higher than the query response times taken from the…
Anakin001
  • 1,226
  • 2
  • 14
  • 30
0
votes
1 answer

[io.r2dbc.spi.ConnectionFactory]: java.lang.NoSuchFieldError: LOCK_WAIT_TIMEOUT

My Java Spring Boot project fails at startup with the given error: Failed to instantiate [io.r2dbc.spi.ConnectionFactory]: Factory method 'connectionFactory' threw exception; nested exception is java.lang.NoSuchFieldError: LOCK_WAIT_TIMEOUT …
Alexander Taylor
  • 16,574
  • 14
  • 62
  • 83
0
votes
1 answer

[spring-data][r2dbc] How to connect to Oracle DB with r2dbc from Application.yml?

[spring-data][r2dbc] How to connect to Oracle DB with r2dbc from Application.yml? application.yml spring: r2dbc: url: r2dbc:oracle:thin//{host}:{port}/{service-name} username: {username} password: {password} This does not…
0
votes
1 answer

@Transactional JUnit test over R2DBC failed to retrieve PlatformTransactionManager

I'm experiencing a R2DBC transaction management issue with (although my application runs fine through a REST controller and also a Spring WebTestClient). My model is quite simple, but I implemented entity callbacks with enforced transaction…
Thomas Escolan
  • 1,298
  • 1
  • 10
  • 28
0
votes
1 answer

R2DBC: Why are RowsFetchSpec operators (.all(),.first(),.one()) signal onComplete although record is stored in database?

I am using DatabaseClient for building a custom Repository. After I insert or update an Item I need that Row data to return the saved/updated Item. I just can´t wrap my head around why .all(), .first(), .one() are not returning the Result Map,…
safarione
  • 65
  • 7
0
votes
1 answer

Spring r2dbc composite support

It seems Spring r2dbc does not support Composite Primary Key / Embedded Classes. What other options or work around can be followed in this case? If i have a table which has Composite Key, then how can I get Flux of objects using partial key, may be…
Spartacus
  • 337
  • 4
  • 12
0
votes
2 answers

Postgresql rule on insert to do nothing and return the given instence

I am trying to write a rule that on insert if there is conflict to do nothing. The hard part is that I am using java code for interacting with the db and the save method expects an instance to be returned. So the goal I am trying to achieve is, a…
NailP
  • 1
0
votes
1 answer

Spring DatabaseClient fetch method returns columns values in different order with different column names

When using database client and fetch method which returns Map, the keys seem to be out of order. Am I doing something wrong here? The code that fetches the map is val result = databaseClient .sql(SELECT_ISSUER_METADATA) …
Barracuda
  • 477
  • 5
  • 19
0
votes
1 answer

Spring Data R2dbc UUID @Id Persistable

I am not sure whether this is a bug or I am using Persistable incorrectly. Aim: make the UserId non-null to avoid having to assert non-null when using in the code User.kt @Table(value = "main.user") data class User( @Id @Column("id") var…
0
votes
1 answer

Enable R2DBC configuration only on demand

I'm working on a library that is consumed by some other project. The library offers database access through JDBC and I'd like to add support for R2DBC too in the same library. The consuming project should be able to switch between JDBC and R2DBC…
Liviu
  • 118
  • 14
0
votes
1 answer

Unexpected NoSuchMethodError RowMetadata.getColumnMetadatas() - In spite of correct dependencies

When running my application (Spring Boot 2.5.7) - after updating to spring-data-r2dbc 1.3.7, I get the NoSuchMethodError RowMetadata.getColumnMetadatas(). (I have also tried this with 1.4.0 - 1.3.7 is where the problem first surfaces.) In this…
0
votes
1 answer

Webflux upload file not saving

I have this piece of code: @PostMapping(value = {"/store"}) public Mono> store(@RequestPart("file") Mono file, @RequestPart("publicationId") String…
Thomas Lang
  • 1,285
  • 17
  • 35
0
votes
1 answer

Run a long running job using the fire and forget strategy with Thymeleaf in Reactor and r2dbc

I am trying to achieve a fire and forget type of effect with webflux, thymeleaf and r2dbc. I have two endpoints, one to add an employee and another to list all employees. I want to simulate a slow database access so I have a thread sleep of several…
53c
  • 381
  • 5
  • 9