3

I use spring boot 2.2 with spring cloud Hoxton.SR1.

I don't have any config class for my db. I only have an application.properties to setup database.

In my application.properties, I have

spring.r2dbc.url=r2dbc:postgresql://localhost:5432/test
spring.r2dbc.schema=mcm
spring.r2dbc.username=test_user
spring.r2dbc.password=zaA41"Vv8%q96@Y>
spring.r2dbc.pool.initial-size=100
spring.r2dbc.pool.max-size=500
spring.r2dbc.pool.max-idle-time=30m
spring.r2dbc.pool.validation-query=SELECT

When I start application,

I have this full stack https://pastebin.com/1714kMW2

In build.gradle

implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-gateway'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'

implementation 'org.springframework.boot.experimental:spring-boot-starter-data-r2dbc'

runtimeOnly 'io.r2dbc:r2dbc-postgresql'
runtimeOnly 'org.postgresql:postgresql'
robert trudel
  • 5,283
  • 17
  • 72
  • 124
  • Looks like you don't have the Postgres driver (`r2dbc-postgresql`, version 0.8.0.RELEASE) on your class-path. – mp911de Dec 28 '19 at 21:18
  • I have it with postgresql – robert trudel Dec 28 '19 at 21:27
  • This is now a different stack trace than the initial one. Previously, no driver was found. This one is a `NullPointerException`. There seems to be a specific bean setup that causes a circular bean initialization that circles back into `afterPropertiesSet()` while `afterPropertiesSet()` is not yet fully executed. Can you post the code to a reproducer? – mp911de Dec 28 '19 at 21:43
  • I copied file there: https://www.pastefile.com/CEfYlq – robert trudel Dec 28 '19 at 21:58
  • Thanks a lot. The issue looks currently like a bug that we could fix in Spring Data Commons. I filed [DATACMNS-1642](https://jira.spring.io/browse/DATACMNS-1642). – mp911de Dec 28 '19 at 22:11
  • I removed a class and resend: https://www.pastefile.com/3rj73C there is a cycle https://pastebin.com/d4HBDnXJ – robert trudel Dec 28 '19 at 22:20
  • Any solutions on this? I am facing the same – Joyal Joseph Mar 08 '22 at 07:37

0 Answers0