Transaction isolation level -1 not supporting
我将spring应用程序连接到smartbaer servicev,在其中创建了虚拟数据源(Postgres)。
驱动程序类别:
连接字符串(本地服务v虚拟服务器url):
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
从spring boot项目执行SQL时显示以下错误(仅适用于JPA和JDBC模板)。
Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Exception: org.postgresql.util.PSQLException: Transaction isolation level -1 not supported.
但是对于以下基本代码,它可以正常工作。
@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;
}
我遇到了相同的错误,并一直追踪到试图连接到比预期代码更高版本的Postresql。