Muhammed Hashir
Muhammed Hashir

Reputation: 21

Transaction isolation level -1 not supporting

I connected the spring application to smartbaer servicev, where the virtual data source (Postgres) created.

Driver class: "com.smartbear.servicev.jdbc.driver.JdbcVirtDriver"

Connection String (Local servicev virtual server url): "jdbc:servicev://localhost:10080"

Application.properties :-

spring.datasource.driver-class-name=com.smartbear.servicev.jdbc.driver.JdbcVirtDriver

spring.datasource.url=jdbc:servicev://localhost:10080

spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect

spring.jpa.show-sql=true

It is showing the following error while executing SQL from spring boot project (Only for JPA and JDBC Template).

Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Exception: org.postgresql.util.PSQLException: Transaction isolation level -1 not supported.

But it is working properly for the following basic code.

@Bean public DataSource getDataSource() { try { Class.forName("com.smartbear.servicev.jdbc.driver.JdbcVirtDriver"); } catch (ClassNotFoundException e) { e.printStackTrace(); } DriverManagerDataSource driverManager = new DriverManagerDataSource("jdbc:servicev://localhost:10080", "", ""); return driverManager; }

Upvotes: 2

Views: 3948

Answers (1)

ericski
ericski

Reputation: 326

I ran into the same error and tracked it down to trying to connect to a newer version Postresql than the code expected.

Upvotes: 1

Related Questions