shining-stars-lk opened a new issue, #32424:
URL: https://github.com/apache/shardingsphere/issues/32424
## Question
An error occurred after service startup:
**org.apache.shardingsphere.single.exception.SingleTablesLoadingException:
Can not load table with database name `logic_db` and data source name `ds`,
reason is: Table name pattern can not be NULL or empty.**
## Configuration
```yaml
dataSources:
ds:
dataSourceClassName: com.alibaba.druid.pool.DruidDataSource
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url:
jdbc:mysql://xxxxxx:3306/mocirelog?&characterEncoding=utf8&useUnicode=true&useSSL=false&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&autoReconnect=true&serverTimezone=Asia/Shanghai
username: mociremsa
password: mOcIre^2m1s9a@10us134a
druid:
maxActive: 60
initialSize: 1
maxWait: 60000
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 60000
validationQuery: "select 'x'"
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 50
removeAbandoned: true
removeAbandonedTimeout: 60
logAbandoned: true
connectionInitSqls: set names utf8mb4
filters: mergeStat
rules:
- !SHARDING
tables:
data_record:
actualDataNodes: ds.data_record_${0..1}
tableStrategy:
standard:
shardingColumn: id
shardingAlgorithmName: tableDataRecordModModel
defaultDatabaseStrategy:
none:
defaultTableStrategy:
none:
shardingAlgorithms:
tableDataRecordModModel:
type: MOD
props:
sharding-count: 2
props:
sql-show: true
```
## Version
spring-boot: 2.3.12.RELEASE
shardingsphere:
```xml
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core</artifactId>
<version>5.3.2</version>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<artifactId>HikariCP</artifactId>
<groupId>com.zaxxer</groupId>
</exclusion>
</exclusions>
</dependency>
```
Configuration means that only one data source is used, and then only
data_record is divided into two tables, and other tables are not divided, using
the defaultTableStrategy Strategy. But now there is the problem that I just
said, is this where the configuration is wrong
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]