You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "shuangqingqiang (via GitHub)" <gi...@apache.org> on 2025/07/13 13:20:55 UTC
[I] about defaultDataSource params [shardingsphere]
shuangqingqiang opened a new issue, #35976:
URL: https://github.com/apache/shardingsphere/issues/35976
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core</artifactId>
<version>5.4.1</version>
</dependency> i am using new version i found defaultDataSource: params was removed i have 30 tables, i need add every table to xml ?but i got one table need worker_attendance:
actualDataNodes: ds_0.worker_attendance_$->{0..15} # 16 tables (0-15)
tableStrategy:
standard:
shardingColumn: org_code
shardingAlgorithmName: org_code_module_algorithm like this other table no need i have add config like rules:
!SHARDING
defaultDatabaseStrategy:
none:
defaultTableStrategy:
none:
defaultDataSource: ds_0
tables:
blacklist:
actualDataNodes: ds_0.blacklist
access_control_records:
actualDataNodes: ds_0.access_control_records
checked_phone:
actualDataNodes: ds_0.checked_phone
dict:
actualDataNodes: ds_0.dict
dingding_organization:
actualDataNodes: ds_0.dingding_organization
dingding_user:
actualDataNodes: ds_0.dingding_user
equipment:
actualDataNodes: ds_0.equipment
feedback:
actualDataNodes: ds_0.feedback
feedback_image:
actualDataNodes: ds_0.feedback_image
fence :
actualDataNodes: ds_0.fence
fence_lon_lat:
actualDataNodes: ds_0.fence_lon_lat
id_card:
actualDataNodes: ds_0.id_card
point:
actualDataNodes: ds_0.point
point_reason:
actualDataNodes: ds_0.point_reason
point_config:
actualDataNodes: ds_0.point_config
project_config:
actualDataNodes: ds_0.project_config
sms:
actualDataNodes: ds_0.sms
sub_contractor_wage:
actualDataNodes: ds_0.sub_contractor_wage
subcontractor:
actualDataNodes: ds_0.subcontractor
team:
actualDataNodes: ds_0.team
team_confirm_wage_record:
actualDataNodes: ds_0.team_confirm_wage_record
team_manager:
actualDataNodes: ds_0.team_manager
unibi_record:
actualDataNodes: ds_0.unibi_record
uni_ubi_access_control:
actualDataNodes: ds_0.uni_ubi_access_control
unit:
actualDataNodes: ds_0.unit
wage_confirm:
actualDataNodes: ds_0.wage_confirm
warn:
actualDataNodes: ds_0.warn
warn_config:
actualDataNodes: ds_0.warn_config
worker:
actualDataNodes: ds_0.worker
worker_attendance:
actualDataNodes: ds_0.worker_attendance_$->{0..15} # 16 tables (0-15)
tableStrategy:
standard:
shardingColumn: org_code
shardingAlgorithmName: org_code_module_algorithm
worker_avatar:
actualDataNodes: ds_0.worker_avatar
worker_bank:
actualDataNodes: ds_0.worker_bank
worker_contract:
actualDataNodes: ds_0.worker_contract
worker_evaluate:
actualDataNodes: ds_0.worker_evaluate
worker_evaluate_default_node:
actualDataNodes: ds_0.worker_evaluate_default_node
worker_evaluate_remove:
actualDataNodes: ds_0.worker_evaluate_remove
worker_examination:
actualDataNodes: ds_0.worker_examination
worker_extra:
actualDataNodes: ds_0.worker_extra
worker_insurance:
actualDataNodes: ds_0.worker_insurance
worker_qualification:
actualDataNodes: ds_0.worker_qualification
worker_recent_photo:
actualDataNodes: ds_0.worker_recent_photo
worker_train:
actualDataNodes: ds_0.worker_train
worker_wage:
actualDataNodes: ds_0.worker_wage
cr11_org_project:
actualDataNodes: ds_1.cr11_org_project
shardingAlgorithms:
org_code_module_algorithm: # 算法名称(需与引用名一致)
type: INLINE
props:
algorithm-expression: worker_attendance_$->{Math.abs(org_code.hashCode() % 16)}
it was not reasonable like this once i remove one table like worker i got this Caused by: org.apache.ibatis.executor.ExecutorException: Error preparing statement. Cause: org.apache.shardingsphere.infra.exception.TableNotExistsException: Table or view `worker` does not exist.
at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:99)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:60)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
at jdk.proxy2/jdk.proxy2.$Proxy184.prepare(Unknown Source)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:90)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:64)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:336)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:158)
at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
at jdk.proxy2/jdk.proxy2.$Proxy183.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:154)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:75)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425)
... 163 common frames omitted
--
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] about defaultDataSource params [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #35976:
URL: https://github.com/apache/shardingsphere/issues/35976#issuecomment-3157180113
Can you format your issue?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] about defaultDataSource params [shardingsphere]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #35976:
URL: https://github.com/apache/shardingsphere/issues/35976#issuecomment-3186093070
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] about defaultDataSource params [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #35976: about defaultDataSource params
URL: https://github.com/apache/shardingsphere/issues/35976
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org