codenotary / immudb

immudb - immutable database based on zero trust, SQL/Key-Value/Document model, tamperproof, data change history
https://immudb.io
Other
8.56k stars 345 forks source link

spring-data-jdbc & immudb postgres driver #1226

Open pkaruna opened 2 years ago

pkaruna commented 2 years ago

Hi team, I was trying to connect to immudb using spring-data-jdbc and postgres driver. But spring is not able to connect to immudb. It works with plain java jdbc connection but not via spring. Can you please let me know 1) Whether immudb can work with spring-data-jdbc using postgres driver 2) If it works , any pointers on the error mentioned below.

Dependecies used are

implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
//runtimeOnly 'org.postgresql:postgresql'
implementation 'org.postgresql:postgresql:42.2.20'

spring version: spring boot 2.6.1 jdk :17

What happened Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.relational.core.dialect.Dialect]: Factory method 'jdbcDialect' threw exception; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.postgresql.util.PSQLException: No results were returned by the query.

What you expected to happen spring-data-jdbc is able to open a connection to immudb. How to reproduce it (as minimally and precisely as possible) Any spring-data-jdbc project connecting to an immudb Environment

# run "immu* version" and copy/paste the output here

Additional info (any other context about the problem)

jeroiraz commented 2 years ago

Hi @pkaruna, thanks for reporting it. It would be great if you can share your sample app so we can easily review it