[英]Transaction isolation level -1 not supporting
I connected the spring application to smartbaer servicev, where the virtual data source (Postgres) created.我将 spring 应用程序连接到创建虚拟数据源 (Postgres) 的 smartbaer servicev。
Driver class: "com.smartbear.servicev.jdbc.driver.JdbcVirtDriver"
驱动程序类:
"com.smartbear.servicev.jdbc.driver.JdbcVirtDriver"
Connection String (Local servicev virtual server url): "jdbc:servicev://localhost:10080"
连接字符串(本地 servicev 虚拟服务器 url):
"jdbc:servicev://localhost:10080"
Application.properties :-
Application.properties :-
spring.datasource.driver-class-name=com.smartbear.servicev.jdbc.driver.JdbcVirtDriver
spring.datasource.driver-class-name=com.smartbear.servicev.jdbc.driver.JdbcVirtDriver
spring.datasource.url=jdbc:servicev://localhost:10080
spring.datasource.url=jdbc:servicev://localhost:10080
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
spring.jpa.show-sql=true
spring.jpa.show-sql=true
It is showing the following error while executing SQL from spring boot project (Only for JPA and JDBC Template).从 spring boot 项目执行 SQL 时显示以下错误(仅适用于 JPA 和 JDBC 模板)。
Failed to obtain JDBC Connection;
获取JDBC连接失败; nested exception is java.sql.SQLException: Exception: org.postgresql.util.PSQLException: Transaction isolation level -1 not supported.
嵌套异常是 java.sql.SQLException:异常:org.postgresql.util.PSQLException:不支持事务隔离级别 -1。
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; }
我遇到了同样的错误并将其追踪到尝试连接到比代码预期的更新版本的 Postresql。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.