11:45:45.487 ERROR com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread 2572 run - create connection SQLException, url: jdbc:gbase://10.77.10.10:5258/ test, errorCode 0, state null java.sql.SQLException: driver not support property druid.stat.slowSqlMillis. at com.gbase.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :378) ~[gbase-connector-java-8.3.81.jar!/:?] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnecti on(DruidAbstractDataSource.java:1578) ~[druid-1.1.14.jar!/:1.1.14] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnecti on(DruidAbstractDataSource.java:1644) ~[druid-1.1.14.jar!/:1.1.14] at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(Dru idDataSource.java:2570) [druid-1.1.14.jar!/:1.1.14]
12:00:28.595 ERROR com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread 2572 run - create connection SQLException, url: jdbc:gbase://10.77.10.10:5258/ test, errorCode 0, state null java.sql.SQLException: driver not support property druid.stat.mergeSql. at com.gbase.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :378) ~[gbase-connector-java-8.3.81.jar!/:?] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnecti on(DruidAbstractDataSource.java:1578) ~[druid-1.1.14.jar!/:1.1.14] at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnecti on(DruidAbstractDataSource.java:1644) ~[druid-1.1.14.jar!/:1.1.14] at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(Dru idDataSource.java:2570) [druid-1.1.14.jar!/:1.1.14]
------------------------------下面是配置-----------------------------
gbasetest: type: com.alibaba.druid.pool.DruidDataSource url: jdbc:gbase://10.77.10.10:5258/test username: gbase password: 'gbase20110531' driverClassName: com.gbase.jdbc.Driver initialSize: 5 minIdle: 5 maxActive: 20 maxWait: 60000 timeBetweenEvictionRunsMillis: 60000 minEvictableIdleTimeMillis: 300000 validationQuery: SELECT 1 FROM DUAL testWhileIdle: true testOnBorrow: false
testOnReturn: false poolPreparedStatements: true maxPoolPreparedStatementPerConnectionSize: 20 useGlobalDataSourceStat: true
---------------------------依赖组件-------------------------------------- com.alibaba druid-spring-boot-starter 1.1.14
请问怎么解决??十分感谢
原提问者GitHub用户rainrcn
使用Gbase数据库时,配置Druid数据源会报关于slowSqlMillis和mergeSql属性的错误。
这是因为Gbase目前还不支持这两个属性。
slowSqlMillis 是 Druid 用来自动报警慢SQL的阈值,Gbase不支持这个配置。
mergeSql 是 Druid 用来合并相同SQL的配置,同样不被Gbase支持。为了解决Gbase中使用Druid报的slowSqlMillis和mergeSql错误,
需要删除、设置为null或使用filtered-datasource来忽略这两个Gbase不支持的属性。
配置中改为 connectionProperties: isCheckProperty=false 就可以禁用属性检查
原回答者GitHub用户chenqi723
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。