shardingsphere5.0.0 + oracle11g-ee 启动报 oracle.jdbc.driver.T4CConnection.getSchema()Ljava/lang/String;

shardingsphere5.0.0 + oracle11g-ee


使用的驱动如下
image
引入的包
image
分片配置

spring:
  shardingsphere:
    props:
      sql-show: true
    datasource:
      names: ds
      ds:
        type: com.alibaba.druid.pool.DruidDataSource
        driver-class-name: oracle.jdbc.OracleDriver
        url: jdbc:oracle:thin:@127.0.0.1:1521/orcl
        username: test
        password: test
    rules:
      sharding:
        key-generators:
          snowflake:
            type: SNOWFLAKE
            props:
              worker-id: 123
        sharding-algorithms:
          charge-detail:
            type: CLASS_BASED
            props: {}
        tables:
          ca_charge_detail:
            actual-data-nodes: ds.ca_charge_detail_$->{2021..2022}_$->{1..4}
            table-strategy:
              standard:
                sharding-column: id
                sharding-algorithm-name: charge-detail
            key-generate-strategy:
              column: id
              key-generator-name: snowflake
    enabled: true

oracle版本:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

demo.zip

能否方便提供下分片配置?如果能提供一个 demo 程序,那就更好了,定位起来会很快速。

已经补充,demo也上传了

好的,辛苦,我们看下

我尝试了一下升级oracle驱动可以解决这个问题

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc6</artifactId>
    <version>11.2.0.3</version>
</dependency>
<dependency>
    <groupId>com.oracle.ojdbc</groupId>
    <artifactId>orai18n</artifactId>
    <version>19.3.0.0</version>
</dependency>

改成

<dependency>
    <groupId>com.oracle.database.jdbc</groupId>
    <artifactId>ojdbc8</artifactId>
    <version>12.2.0.1</version>
</dependency>
1 个赞
京ICP备2021015875号