You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/04/16 08:21:14 UTC
[GitHub] [incubator-shardingsphere] coderMmw opened a new issue #5208: data
fragmentation and separation of reading and writing problem
coderMmw opened a new issue #5208: data fragmentation and separation of reading and writing problem
URL: https://github.com/apache/incubator-shardingsphere/issues/5208
【sharding.xml info】
`<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:master-slave="http://shardingsphere.apache.org/schema/shardingsphere/masterslave"
xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://shardingsphere.apache.org/schema/shardingsphere/masterslave
http://shardingsphere.apache.org/schema/shardingsphere/masterslave/master-slave.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://shardingsphere.apache.org/schema/shardingsphere/sharding
http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
">
<!--
xmlns:rdb="http://www.dangdang.com/schema/ddframe/rdb"
http://www.dangdang.com/schema/ddframe/rdb
http://www.dangdang.com/schema/ddframe/rdb/rdb.xsd-->
<!-- <context:property-placeholder location="classpath:source.properties"
ignore-unresolvable="true"/> -->
<bean id="defaultDataSource" class="com.alibaba.druid.pool.DruidDataSource"
init-method="init" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="${master.jdbc.url}" />
<property name="username" value="${master.jdbc.username}" />
<property name="password" value="${master.jdbc.password}" />
<property name="initialSize" value="2" />
<property name="minIdle" value="2" />
<property name="maxActive" value="30" />
<property name="testOnBorrow" value="true" />
<property name="testWhileIdle" value="true" />
<property name="testOnReturn" value="false" />
<property name="validationQuery" value="SELECT 'x'" />
<property name="maxWait" value="5000" />
<property name="minEvictableIdleTimeMillis" value="30000" />
<property name="removeAbandoned" value="true" />
<property name="removeAbandonedTimeout" value="10000" />
<property name="timeBetweenEvictionRunsMillis" value="600000" />
</bean>
<bean id="readDataSource" class="com.alibaba.druid.pool.DruidDataSource"
init-method="init" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="${salve.jdbc.url}" />
<property name="username" value="${salve.jdbc.username}" />
<property name="password" value="${salve.jdbc.password}" />
<property name="initialSize" value="2" />
<property name="minIdle" value="2" />
<property name="maxActive" value="30" />
<property name="testOnBorrow" value="true" />
<property name="testWhileIdle" value="true" />
<property name="testOnReturn" value="false" />
<property name="validationQuery" value="SELECT 'x'" />
<property name="maxWait" value="5000" />
<property name="minEvictableIdleTimeMillis" value="30000" />
<property name="removeAbandoned" value="true" />
<property name="removeAbandonedTimeout" value="10000" />
<property name="timeBetweenEvictionRunsMillis" value="600000" />
</bean>
<!--<master-slave:data-source id="masterSlaveDataSource" master-data-source-name="defaultDataSource" slave-data-source-names="readDataSource" >-->
<!--<master-slave:props>-->
<!--<prop key="sql.show">true</prop>-->
<!--<prop key="executor.size">10</prop>-->
<!--<prop key="foo">bar</prop>-->
<!--</master-slave:props>-->
<!--</master-slave:data-source>-->
<bean id="singleKeyHashShardingAlgorithm1" class="com.pptv.ucm.dao.sharding.SingleKeyHashShardingAlgorithm1" />
<!--<sharding:master-slave-data-source id="masterSlaveDataSource"-->
<!--master-data-source-ref="defaultDataSource" slave-data-sources-ref="readDataSource" />-->
<sharding:standard-strategy id="orderTableStrategy" sharding-column="order_id" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<sharding:standard-strategy id="userTableStrategy" sharding-column="user_account" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<sharding:standard-strategy id="macTableStrategy" sharding-column="mac" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<sharding:standard-strategy id="macPointRecordStrategy" sharding-column="mac" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<sharding:standard-strategy id="userPointRecordStrategy" sharding-column="user_account" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<!--<sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression=""/>-->
<!--<sharding:inline-strategy id="userTableStrategy" sharding-column="user_account"-->
<!--algorithm-expression=""/>-->
<!--<sharding:inline-strategy id="macTableStrategy" sharding-column="mac"-->
<!--algorithm-expression=""/>-->
<!--<sharding:inline-strategy id="macPointRecordStrategy" sharding-column="mac"-->
<!--algorithm-expression="" />-->
<!--<sharding:inline-strategy id="userPointRecordStrategy" sharding-column="user_account"-->
<!--algorithm-expression="" />-->
<sharding:data-source id="shardingDataSource">
<sharding:sharding-rule data-source-names="defaultDataSource,readDataSource">
<sharding:master-slave-rules>
<sharding:master-slave-rule id="defaultDataSource0" master-data-source-name="defaultDataSource" slave-data-source-names="readDataSource" />
</sharding:master-slave-rules>
<sharding:table-rules>
<sharding:table-rule logic-table="ucm_order"
actual-data-nodes="ucm_order_$->{0..9}" table-strategy-ref="orderTableStrategy" />
<sharding:table-rule logic-table="ucm_subscriber"
actual-data-nodes="ucm_subscriber_$->{0..9}" table-strategy-ref="userTableStrategy" />
<sharding:table-rule logic-table="ucm_mac_goods"
actual-data-nodes="ucm_mac_goods_$->{0..9}" table-strategy-ref="macTableStrategy" />
<sharding:table-rule logic-table="ucm_mac_points_record"
actual-data-nodes="ucm_mac_points_record_$->{0..9}" table-strategy-ref="macPointRecordStrategy" />
<sharding:table-rule logic-table="ucm_user_points_income_record"
actual-data-nodes="ucm_user_points_income_record_$->{0..9}" table-strategy-ref="userPointRecordStrategy" />
</sharding:table-rules>
</sharding:sharding-rule>
</sharding:data-source>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="shardingDataSource" />
<property name="mapperLocations" value="classpath:mapper/*.Mapper.xml"></property>
<property name="configLocation" value="classpath:config/mybatis-config.xml" />
</bean>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="shardingDataSource" />
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="get*" read-only="true" />
<tx:method name="find*" read-only="true" />
<tx:method name="query*" read-only="true" />
<tx:method name="is*" read-only="true" />
<tx:method name="do*" propagation="REQUIRES_NEW"
rollback-for="java.lang.Exception" />
<tx:method name="save*" propagation="REQUIRED"
rollback-for="java.lang.Exception" />
<tx:method name="update*" propagation="REQUIRED"
rollback-for="java.lang.Exception" />
<tx:method name="insert*" propagation="REQUIRED"
rollback-for="java.lang.Exception" />
<tx:method name="delete*" propagation="REQUIRED"
rollback-for="java.lang.Exception" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="pc"
expression="execution(* com.pptv.ucm.service.impl.*.*(..))" />
<aop:advisor pointcut-ref="pc" advice-ref="txAdvice" />
</aop:config>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="annotationClass" value="org.springframework.stereotype.Repository" />
<property name="basePackage" value="com.pptv.ucm.dao" />
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
</bean>
</beans>`
SingleKeyHashShardingAlgorithm1.class
`package com.pptv.ucm.dao.sharding;
import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm;
import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue;
import org.apache.shardingsphere.api.sharding.standard.RangeShardingAlgorithm;
import org.apache.shardingsphere.api.sharding.standard.RangeShardingValue;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import static java.lang.Math.abs;
/**
*
*/
//public class SingleKeyHashShardingAlgorithm1 implements /*SingleKeyTableShardingAlgorithm<String>,*/PreciseShardingAlgorithm, RangeShardingAlgorithm<Integer> {
public class SingleKeyHashShardingAlgorithm1 implements PreciseShardingAlgorithm<String> {
@Override
public String doSharding(Collection<String> collection, PreciseShardingValue<String> preciseShardingValue) {
int mod = abs(preciseShardingValue.getValue().hashCode()) % collection.size();
System.out.println("SingleKeyHashShardingAlgorithm1 current mod = " + mod);
String suffix = mod + "";
for(String each: collection) {
if(each.endsWith(suffix)) {
return each;
}
}
throw new IllegalArgumentException();
}
public static void main(String[] args) {
String s = null;
int i = Math.abs("00:25:92:EE:6F:EE".hashCode()) % 10;
System.out.println(i);
}
}
`
When I started the project,
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shardingsphere.shardingjdbc.spring.datasource.SpringShardingDataSource]: Constructor threw exception; nested exception is org.apache.shardingsphere.core.exception.ShardingConfigurationException: Invalid format for actual data nodes: 'ucm_order_0'
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:267)
... 113 more
Caused by: org.apache.shardingsphere.core.exception.ShardingConfigurationException: Invalid format for actual data nodes: 'ucm_order_0'
at org.apache.shardingsphere.core.rule.DataNode.<init>(DataNode.java:52)
at org.apache.shardingsphere.core.rule.TableRule.generateDataNodes(TableRule.java:141)
at org.apache.shardingsphere.core.rule.TableRule.<init>(TableRule.java:100)
at org.apache.shardingsphere.core.rule.ShardingRule.createTableRules(ShardingRule.java:99)
at org.apache.shardingsphere.core.rule.ShardingRule.<init>(ShardingRule.java:85)
at org.apache.shardingsphere.shardingjdbc.spring.datasource.SpringShardingDataSource.<init>(SpringShardingDataSource.java:38)
at sun.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking edited a comment on issue
#5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #5208: data fragmentation and separation of reading and writing problem
URL: https://github.com/apache/incubator-shardingsphere/issues/5208#issuecomment-614512497
Config actual-data-nodes must be starting with it's logic db, 'defaultDataSource0' in your case:
```
<sharding:table-rule logic-table="ucm_order"
actual-data-nodes="defaultDataSource0.ucm_order_$->{0..9}"
table-strategy-ref="orderTableStrategy" />
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] coderMmw commented on issue #5208: data
fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw commented on issue #5208: data fragmentation and separation of reading and writing problem
URL: https://github.com/apache/incubator-shardingsphere/issues/5208#issuecomment-614517149
> Config actual-data-nodes must be starting with it's logic db, 'defaultDataSource0' in your case:
>
> ```
> <sharding:table-rule logic-table="ucm_order"
> actual-data-nodes="defaultDataSource0.ucm_order_$->{0..9}"
> table-strategy-ref="orderTableStrategy" />
> ```
Is it because of the version I quoted
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [shardingsphere] kimmking commented on issue #5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #5208:
URL: https://github.com/apache/shardingsphere/issues/5208#issuecomment-616360361
> > Config actual-data-nodes must be starting with it's logic db, 'defaultDataSource0' in your case:
> > ```
> > <sharding:table-rule logic-table="ucm_order"
> > actual-data-nodes="defaultDataSource0.ucm_order_$->{0..9}"
> > table-strategy-ref="orderTableStrategy" />
> > ```
>
> Is it because of the version I quoted
what you quoted?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] coderMmw edited a comment on issue #5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw edited a comment on issue #5208:
URL: https://github.com/apache/shardingsphere/issues/5208#issuecomment-614517149
> Config actual-data-nodes must be starting with it's logic db, 'defaultDataSource0' in your case:
>
> ```
> <sharding:table-rule logic-table="ucm_order"
> actual-data-nodes="defaultDataSource0.ucm_order_$->{0..9}"
> table-strategy-ref="orderTableStrategy" />
> ```
Is it because of the version I quoted
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shardingsphere] kimmking edited a comment on issue
#5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #5208: data fragmentation and separation of reading and writing problem
URL: https://github.com/apache/incubator-shardingsphere/issues/5208#issuecomment-614512497
Config actual-data-nodes must be with it's logic db, 'defaultDataSource0' in your case:
```
<sharding:table-rule logic-table="ucm_order"
actual-data-nodes="defaultDataSource0.ucm_order_$->{0..9}"
table-strategy-ref="orderTableStrategy" />
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [shardingsphere] kimmking closed issue #5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
kimmking closed issue #5208:
URL: https://github.com/apache/shardingsphere/issues/5208
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] coderMmw commented on issue #5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw commented on issue #5208:
URL: https://github.com/apache/shardingsphere/issues/5208#issuecomment-616365242
there is another problem,when i query the data of this table,it can not find this table .
it should be to query sub-table but got error
` Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ott_ucm.ucm_user_points_income_record' doesn't exist
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ott_ucm.ucm_user_points_income_record' doesn't exist
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:364)
at com.sun.proxy.$Proxy20.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:194)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:114)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:58)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
at com.sun.proxy.$Proxy51.getUserPointTotal(Unknown Source)
at com.pptv.ucm.service.impl.UserPointsServiceImpl.listParams(UserPointsServiceImpl.java:189)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
at com.sun.proxy.$Proxy53.listParams(Unknown Source)
at com.pptv.ucm.controller.points.PointsTaskStatisticsController.pageUserTaskStatisticsList(PointsTaskStatisticsController.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:871)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.pptv.ucm.common.filter.AuthorizationFilter.doFilter(AuthorizationFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:609)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ott_ucm.ucm_user_points_income_record' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
at com.mysql.jdbc.Util.getInstance(Util.java:360)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1199)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:493)
at org.apache.shardingsphere.shardingjdbc.executor.SQLExecuteCallbackFactory$2.executeSQL(SQLExecuteCallbackFactory.java:65)
at org.apache.shardingsphere.shardingjdbc.executor.SQLExecuteCallbackFactory$2.executeSQL(SQLExecuteCallbackFactory.java:61)
at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteCallback.execute0(SQLExecuteCallback.java:69)
at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteCallback.execute(SQLExecuteCallback.java:58)
at org.apache.shardingsphere.core.execute.ShardingExecuteEngine.syncGroupExecute(ShardingExecuteEngine.java:126)
at org.apache.shardingsphere.core.execute.ShardingExecuteEngine.parallelExecute(ShardingExecuteEngine.java:103)
at org.apache.shardingsphere.core.execute.ShardingExecuteEngine.groupExecute(ShardingExecuteEngine.java:83)
at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteTemplate.executeGroup(SQLExecuteTemplate.java:73)
at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteTemplate.executeGroup(SQLExecuteTemplate.java:56)
at org.apache.shardingsphere.shardingjdbc.executor.AbstractStatementExecutor.executeCallback(AbstractStatementExecutor.java:128)
at org.apache.shardingsphere.shardingjdbc.executor.PreparedStatementExecutor.execute(PreparedStatementExecutor.java:156)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:172)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:56)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:57)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:354)`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shardingsphere] coderMmw commented on issue #5208: data
fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw commented on issue #5208: data fragmentation and separation of reading and writing problem
URL: https://github.com/apache/incubator-shardingsphere/issues/5208#issuecomment-614495014
sharding pom.xml
`
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-core</artifactId>
<version>4.0.0-RC1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-namespace</artifactId>
<version>4.0.0-RC1-SNAPSHOT</version>
</dependency>
`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [shardingsphere] coderMmw commented on issue #5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw commented on issue #5208:
URL: https://github.com/apache/shardingsphere/issues/5208#issuecomment-616366447
singleKeyHashShardingAlgorithm1 class
`package com.pptv.ucm.dao.sharding;
import org.apache.shardingsphere.api.sharding.standard.PreciseShardingAlgorithm;
import org.apache.shardingsphere.api.sharding.standard.PreciseShardingValue;
import org.apache.shardingsphere.api.sharding.standard.RangeShardingAlgorithm;
import org.apache.shardingsphere.api.sharding.standard.RangeShardingValue;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import static java.lang.Math.abs;
/**
* 根据单个字段hash来分表的实现
*
*/
//public class SingleKeyHashShardingAlgorithm1 implements /*SingleKeyTableShardingAlgorithm<String>,*/PreciseShardingAlgorithm, RangeShardingAlgorithm<Integer> {
public class SingleKeyHashShardingAlgorithm1 implements PreciseShardingAlgorithm<String>, RangeShardingAlgorithm<Integer> {
@Override
public String doSharding(Collection<String> collection, PreciseShardingValue<String> preciseShardingValue) {
// 逻辑表名
// 根据比较的值,算出物理分表
String logicTableName = preciseShardingValue.getLogicTableName();
String actualTableName = logicTableName + "_" + Math.abs(preciseShardingValue.getValue().hashCode()) % collection.size();
if (collection.contains(actualTableName)) {
return actualTableName;
} else {
// 如果没有匹配到相应的物理表名,那一定是有问题的
throw new UnsupportedOperationException();
}
// @Override
// public String doSharding(Collection collection, PreciseShardingValue preciseShardingValue) {
// // 逻辑表名
// String logicTableName = preciseShardingValue.getLogicTableName();
// // 根据比较的值,算出物理分表
//
// String actualTableName = logicTableName + "_" + Math.abs(preciseShardingValue.getValue().hashCode())% collection.size();
// if (collection.contains(actualTableName)){
// return actualTableName;
// }else{
// // 如果没有匹配到相应的物理表名,那一定是有问题的
// throw new UnsupportedOperationException();
// }
//
//
// // 如果没有匹配到相应的物理表名,那一定是有问题的
//
// }
//
// @Override
// public Collection<String> doSharding(Collection<String> availableTargetNames, RangeShardingValue<Integer> shardingValue) {
// // in表达式的值对应的数据表
// Set<String> inValueTables = new HashSet<String>();
//
//
// String logicTableName = shardingValue.getLogicTableName();
// for (String value : availableTargetNames) {
// String actualTableName = logicTableName + "_" + value.hashCode() % availableTargetNames.size();
// if (availableTargetNames.contains(actualTableName)){
// inValueTables.add(actualTableName);
// }
// }
//
// if (inValueTables.size() == 0){
// throw new UnsupportedOperationException();
// }
//
// return inValueTables;
// }
}
public static void main(String[] args) {
String s = null;
int i = Math.abs("00:25:92:EE:6F:EE".hashCode()) % 10;
System.out.println(i);
}
@Override
public Collection<String> doSharding(Collection<String> availableTargetNames, RangeShardingValue<Integer> shardingValue) {
// in表达式的值对应的数据表
Set<String> inValueTables = new HashSet<String>();
String logicTableName = shardingValue.getLogicTableName();
for (String value : availableTargetNames) {
String actualTableName = logicTableName + "_" + value.hashCode() % availableTargetNames.size();
if (availableTargetNames.contains(actualTableName)){
inValueTables.add(actualTableName);
}
}
if (inValueTables.size() == 0){
throw new UnsupportedOperationException();
}
return inValueTables;
}
}
`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shardingsphere] coderMmw commented on issue #5208: data
fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw commented on issue #5208: data fragmentation and separation of reading and writing problem
URL: https://github.com/apache/incubator-shardingsphere/issues/5208#issuecomment-614516485
It's been found to be a problem in this place,but new problems arise after modification
`Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shardingsphere.shardingjdbc.spring.datasource.SpringShardingDataSource]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration.getEncryptorConfig()Lorg/apache/shardingsphere/api/config/encryptor/EncryptorConfiguration;
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:267)
... 113 more
Caused by: java.lang.NoSuchMethodError: org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration.getEncryptorConfig()Lorg/apache/shardingsphere/api/config/encryptor/EncryptorConfiguration;
at org.apache.shardingsphere.core.rule.TableRule.<init>(TableRule.java:106)
at org.apache.shardingsphere.core.rule.ShardingRule.createTableRules(ShardingRule.java:99)
at org.apache.shardingsphere.core.rule.ShardingRule.<init>(ShardingRule.java:85)
at org.apache.shardingsphere.shardingjdbc.spring.datasource.SpringShardingDataSource.<init>(SpringShardingDataSource.java:38)
at sun.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 115 more`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [shardingsphere] coderMmw edited a comment on issue #5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw edited a comment on issue #5208:
URL: https://github.com/apache/shardingsphere/issues/5208#issuecomment-614495014
sharding pom.xml
```
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-core</artifactId>
<version>4.0.0-RC1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-namespace</artifactId>
<version>4.0.0-RC1-SNAPSHOT</version>
</dependency>
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] coderMmw commented on issue #5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw commented on issue #5208:
URL: https://github.com/apache/shardingsphere/issues/5208#issuecomment-616360801
> > > Config actual-data-nodes must be starting with it's logic db, 'defaultDataSource0' in your case:
> > > ```
> > > <sharding:table-rule logic-table="ucm_order"
> > > actual-data-nodes="defaultDataSource0.ucm_order_$->{0..9}"
> > > table-strategy-ref="orderTableStrategy" />
> > > ```
> >
> >
> > Is it because of the version I quoted
>
> what you quoted?
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-core</artifactId>
<version>4.0.0-RC1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-namespace</artifactId>
<version>4.0.0-RC1-SNAPSHOT</version>
</dependency>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] coderMmw edited a comment on issue #5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw edited a comment on issue #5208:
URL: https://github.com/apache/shardingsphere/issues/5208#issuecomment-614517149
> Config actual-data-nodes must be starting with it's logic db, 'defaultDataSource0' in your case:
>
> ```
> <sharding:table-rule logic-table="ucm_order"
> actual-data-nodes="defaultDataSource0.ucm_order_$->{0..9}"
> table-strategy-ref="orderTableStrategy" />
> ```
what you quoted?
Is it because of the version I quoted
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shardingsphere] kimmking commented on issue #5208: data
fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #5208: data fragmentation and separation of reading and writing problem
URL: https://github.com/apache/incubator-shardingsphere/issues/5208#issuecomment-614512497
```
<sharding:table-rule logic-table="ucm_order"
actual-data-nodes="defaultDataSource0.ucm_order_$->{0..9}"
table-strategy-ref="orderTableStrategy" />
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on issue #5208: data
fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #5208: data fragmentation and separation of reading and writing problem
URL: https://github.com/apache/incubator-shardingsphere/issues/5208#issuecomment-614551341
yes, plz check your version.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [shardingsphere] coderMmw commented on issue #5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw commented on issue #5208:
URL: https://github.com/apache/shardingsphere/issues/5208#issuecomment-616366192
xml info
`<sharding:standard-strategy id="orderTableStrategy" sharding-column="order_id" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<sharding:standard-strategy id="userTableStrategy" sharding-column="user_account" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<sharding:standard-strategy id="macTableStrategy" sharding-column="mac" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<sharding:standard-strategy id="macPointRecordStrategy" sharding-column="mac" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<sharding:standard-strategy id="userPointRecordStrategy" sharding-column="user_account" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<sharding:standard-strategy id="userCopyTableStrategy" sharding-column="user_account" precise-algorithm-ref="singleKeyHashShardingAlgorithm1" />
<sharding:data-source id="shardingDataSource">
<sharding:sharding-rule data-source-names="defaultDataSource,readDataSource">
<sharding:master-slave-rules>
<sharding:master-slave-rule id="defaultDataSource0" master-data-source-name="defaultDataSource" slave-data-source-names="readDataSource" />
</sharding:master-slave-rules>
<sharding:table-rules>
<sharding:table-rule logic-table="ucm_order"
actual-data-nodes="defaultDataSource0.ucm_order_${0..9}" table-strategy-ref="orderTableStrategy" />
<sharding:table-rule logic-table="ucm_subscriber"
actual-data-nodes="defaultDataSource0.ucm_subscriber_${0..9}" table-strategy-ref="userTableStrategy" />
<sharding:table-rule logic-table="ucm_mac_goods"
actual-data-nodes="defaultDataSource0.ucm_mac_goods_${0..9}" table-strategy-ref="macTableStrategy" />
<sharding:table-rule logic-table="ucm_mac_points_record"
actual-data-nodes="defaultDataSource0.ucm_mac_points_record_${0..9}" table-strategy-ref="macPointRecordStrategy" />
<sharding:table-rule logic-table="ucm_user_points_income_record"
actual-data-nodes="defaultDataSource0.ucm_user_points_income_record_${0..9}" table-strategy-ref="userPointRecordStrategy" />
<sharding:table-rule logic-table="ucm_user_copy1"
actual-data-nodes="defaultDataSource0.ucm_user_copy1_${0..9}" table-strategy-ref="userCopyTableStrategy" />
</sharding:table-rules>
<!--<sharding:binding-table-rules>-->
<!--<sharding:binding-table-rule logic-tables="ucm_order,ucm_subscriber,ucm_mac_goods,ucm_mac_points_record,ucm_user_points_income_record"/>-->
<!--</sharding:binding-table-rules>-->
<!--<sharding:broadcast-table-rules>-->
<!--<sharding:broadcast-table-rule table="t_address"/>-->
<!--</sharding:broadcast-table-rules>-->
</sharding:sharding-rule>
<sharding:props>
<prop key="sql.show">false</prop>
</sharding:props>
</sharding:data-source>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="shardingDataSource" />
<!-- 自动扫描mapping.xml文件 -->
<property name="mapperLocations" value="classpath:mapper/*.Mapper.xml"></property>
<property name="configLocation" value="classpath:config/mybatis-config.xml" />
</bean>
<!-- (事务管理)transaction manager, use JtaTransactionManager for global tx -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="shardingDataSource" />
</bean>`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] coderMmw edited a comment on issue #5208: data fragmentation and separation of reading and writing problem
Posted by GitBox <gi...@apache.org>.
coderMmw edited a comment on issue #5208:
URL: https://github.com/apache/shardingsphere/issues/5208#issuecomment-614516485
It's been found to be a problem in this place,but new problems arise after modification
```
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shardingsphere.shardingjdbc.spring.datasource.SpringShardingDataSource]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration.getEncryptorConfig()Lorg/apache/shardingsphere/api/config/encryptor/EncryptorConfiguration;
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:267)
... 113 more
Caused by: java.lang.NoSuchMethodError: org.apache.shardingsphere.api.config.sharding.TableRuleConfiguration.getEncryptorConfig()Lorg/apache/shardingsphere/api/config/encryptor/EncryptorConfiguration;
at org.apache.shardingsphere.core.rule.TableRule.<init>(TableRule.java:106)
at org.apache.shardingsphere.core.rule.ShardingRule.createTableRules(ShardingRule.java:99)
at org.apache.shardingsphere.core.rule.ShardingRule.<init>(ShardingRule.java:85)
at org.apache.shardingsphere.shardingjdbc.spring.datasource.SpringShardingDataSource.<init>(SpringShardingDataSource.java:38)
at sun.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 115 more
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org