yugabyte / spring-data-yugabytedb

Spring Data Module for YugabyteDB.
18 stars 6 forks source link

spring-data-yugabytedb-ysql not compatible with Spring Boot 2.7.X #6

Open dawidtomczyk opened 2 years ago

dawidtomczyk commented 2 years ago

Here is a simple demo: https://github.com/dawidtomczyk/yugabyte-error-demo

Try to run with mvn spring-boot:run, and you will get

Caused by: java.lang.ClassNotFoundException: org.postgresql.util.PSQLException

Remove dependency from pom.xml `

com.yugabyte
        <artifactId>jdbc-yugabytedb</artifactId>
        <version>42.3.5-yb-1</version>
    </dependency>

and you will get an error suggesting that constructor API inorg.springframework.data.jdbc.core.convert.DefaultDataAccessStrategy` has changed.

` Action:

Correct the classpath of your application so that it contains compatible versions of the classes com.yugabyte.data.jdbc.core.convert.DefaultYsqlDataAccessStrategy and org.springframework.data.jdbc.core.convert.DefaultDataAccessStrategy

`

It would be great if you could support Spring Boot 2.7.X. Are you planning to support future versions, e.g., Spring Boot 3.0?

nchandrappa commented 2 years ago

Hi @dawidtomczyk It looks like an issue with the current SDYB version. Yes, we have plans to keep up with the Spring release train. We'll update you once we have the fix and release of a new version of SDYB.

menacher commented 2 years ago

This issue is happening for any new spring release see https://stackoverflow.com/questions/73811124/yugabytebd-springboot-integration

Using spring 2.6.x works.