druid连接SQL Server异常

最后更新:2024-07-04 10:48:12 | 状态:未完成

在获取schema时会有个异常, 
java.lang.AbstractMethodError: Receiver class oracle.jdbc.driver.T4CConnection does not define or inherit an implementation of the resolved method abstract getSchema()Ljava/lang/String; of interface java.sql.Connection.
    at com.alibaba.druid.pool.DruidPooledConnection.getSchema(DruidPooledConnection.java:1222) ~[druid-1.2.18.jar:na]
    at org.anyline.environment.spring.data.jdbc.SpringJDBCWorker.checkSchema(SpringJDBCWorker.java:175) ~[anyline-environment-spring-data-jdbc-8.7.2-20240702.jar:na]
    at org.anyline.environment.spring.data.jdbc.SpringJDBCWorker.checkSchema(SpringJDBCWorker.java:110) ~[anyline-environment-spring-data-jdbc-8.7.2-20240702.jar:na]
    at org.anyline.environment.spring.data.jdbc.SpringJDBCWorker.checkSchema(SpringJDBCWorker.java:141) ~[anyline-environment-spring-data-jdbc-8.7.2-20240702.jar:na]
    at org.anyline.data.jdbc.adapter.init.AbstractJDBCAdapter.checkSchema(AbstractJDBCAdapter.java:9529) ~[anyline-data-jdbc-8.7.2-20240702.jar:na]
    at org.anyline.data.jdbc.adapter.init.OracleGenusAdapter.checkSchema(OracleGenusAdapter.java:6801) ~[anyline-data-jdbc-8.7.2-20240702.jar:na]
    at org.anyline.data.jdbc.oracle.OracleAdapter.checkSchema(OracleAdapter.java:6332) ~[anyline-data-jdbc-oracle-8.7.2-20240702.jar:na]
    at org.anyline.data.adapter.init.AbstractDriverAdapter.tables(AbstractDriverAdapter.java:4258) ~[anyline-data-8.7.2-20240702.jar:na]
    at org.anyline.data.jdbc.adapter.init.AbstractJDBCAdapter.tables(AbstractJDBCAdapter.java:3011) ~[anyline-data-jdbc-8.7.2-20240702.jar:na]
    at org.anyline.data.adapter.init.AbstractDriverAdapter.tables(AbstractDriverAdapter.java:4451) ~[anyline-data-8.7.2-20240702.jar:na]
    at org.anyline.data.jdbc.adapter.init.AbstractJDBCAdapter.tables(AbstractJDBCAdapter.java:3033) ~[anyline-data-jdbc-8.7.2-20240702.jar:na]
    at org.anyline.data.jdbc.oracle.OracleAdapter.tables(OracleAdapter.java:1702) ~[anyline-data-jdbc-oracle-8.7.2-20240702.jar:na]
    at org.anyline.dao.init.DefaultDao.tables(DefaultDao.java:978) ~[anyline-data-8.7.2-20240702.jar:na]
    at org.anyline.dao.AnylineDao.tables(AnylineDao.java:742) ~[anyline-data-8.7.2-20240702.jar:na]
    at org.anyline.service.init.DefaultService$2.tables(DefaultService.java:1989) ~[anyline-data-8.7.2-20240702.jar:na]
    at org.anyline.service.AnylineService$MetaDataService.tables(AnylineService.java:1927) ~[anyline-data-8.7.2-20240702.jar:na]
    at org.anyline.service.AnylineService$MetaDataService.tables(AnylineService.java:1930) ~[anyline-data-8.7.2-20240702.jar:na]
    at org.anyline.service.AnylineService$MetaDataService.tables(AnylineService.java:1992) ~[anyline-data-8.7.2-20240702.jar:na]
    at org.anyline.service.init.DefaultService$2.table(DefaultService.java:2053) ~[anyline-data-8.7.2-20240702.jar:na]
    at org.anyline.service.AnylineService$MetaDataService.table(AnylineService.java:2043) ~[anyline-data-8.7.2-20240702.jar:na]
    at org.anyline.service.AnylineService$MetaDataService.table(AnylineService.java:2074) ~[anyline-data-8.7.2-20240702.jar:na]

public String getschema() throws SQLException {
throw new SOLFeatureNotSupportedException()
}
看了几个版本的源码,这个方法就没有实现
换成1.1.15版本试一下

首页 最近更新 搜索 提交 回复