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 2022/10/10 06:31:35 UTC

[GitHub] [shardingsphere] mahesh001 opened a new issue, #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

mahesh001 opened a new issue, #21119:
URL: https://github.com/apache/shardingsphere/issues/21119

   I am using shardingsphere version 5.1.1 with spring ( no springboot)
   
   here is  my code block for data source :
   
   `public DataSource shardingCustomer() throws SQLException {
           Map<String, DataSource> dataSourceMap = getDatasourceMap();
           Properties properties = getProperties();
           LinkedList rules = new LinkedList<>();
           ShardingRuleConfiguration shardingRuleConfig = new ShardingRuleConfiguration();
           shardingRuleConfig.getTables().add(getstaffTableRuleConfiguration());
           shardingRuleConfig.setDefaultTableShardingStrategy(new StandardShardingStrategyConfiguration("age", StaffTableTableShardingAlgorithm.class.getName()));
           rules.add(shardingRuleConfig);
           return  ShardingSphereDataSourceFactory.createDataSource("turvo_connect",dataSourceMap, rules,
                   properties);
       }`
       
        private static ShardingTableRuleConfiguration getstaffTableRuleConfiguration() {
           ShardingTableRuleConfiguration st = new  ShardingTableRuleConfiguration("staff", "turvo_connect.staff_${0..2}");
           st.setTableShardingStrategy(new StandardShardingStrategyConfiguration("age", StaffTableTableShardingAlgorithm.class.getName()));
           return st;
       }
       
          private Properties getProperties() {
           Properties properties = new Properties();
           properties.setProperty("sql.show", "true");
           return properties;
       }
   
   
       private Map<String, DataSource> getDatasourceMap() {
           Map<String, DataSource> dataSourceMap = new HashMap<>(4);
           HikariConfig hikariConfig = new HikariConfig();
   		hikariConfig.setUsername("###");
   		hikariConfig.setPassword("####");
   		hikariConfig.setJdbcUrl("#####");
           hikariConfig.setDriverClassName("com.mysql.jdbc.Driver");
   		HikariDataSource dataSource = new HikariDataSource(hikariConfig);
           dataSourceMap.put("turvo_connect", dataSource);
           return dataSourceMap;
       }
       
       public abstract class StaffTableTableShardingAlgorithm implements StandardShardingAlgorithm<Integer> {
       @Override
       public String doSharding(Collection<String> availableTargetNames,
                                PreciseShardingValue<Integer> shardingValue) {
           if (availableTargetNames.contains("staff")) {
               return "staff";
           }
           Integer tmp = shardingValue.getValue();
           int mode =tmp%3;
           return "staff_"+mode;
       }
   }`
       When i am inserting data into the table I am getting the below exception : 
   
       `2022-09-21 15:08:32.546  INFO 55927 --- [nio-8080-exec-5] c.t.p.s.ShardingService                  : got into ShardingServiceImpl -> insertDemo, param is -> StaffPO(id=c0b55b9b-c9f5-4bb5-a8b6-7769e91dcf95, age=9, name=PwrSjVxhmg, gender=M)`
   `2022-09-21 15:08:32.771  INFO 55927 --- [nio-8080-exec-5] o.h.e.j.b.i.AbstractBatchImpl            : HHH000010: On release of batch it still contained JDBC statements
   2022-09-21 15:08:32.776 ERROR 55927 --- [nio-8080-exec-5] c.t.p.c.StaffController                  : Error occurred while iterating  loop :: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.
   2022-09-21 15:08:32.776 ERROR 55927 --- [nio-8080-exec-5] c.t.p.c.StaffController                  : org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.
   java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.
   	at com.google.common.base.Preconditions.checkState(Preconditions.java:508)
   	at org.apache.shardingsphere.sharding.route.engine.validator.dml.impl.ShardingInsertStatementValidator.postValidate(ShardingInsertStatementValidator.java:101)
   	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.lambda$createRouteContext$1(ShardingSQLRouter.java:57)
   	at java.util.Optional.ifPresent(Optional.java:159)
   	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:57)
   	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:44)
   	at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:73)
   	at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:53)
   	at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.route(KernelProcessor.java:54)
   	at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:46)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createExecutionContext(ShardingSpherePreparedStatement.java:470)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.executeUpdate(ShardingSpherePreparedStatement.java:309)
   	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
   	at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46)
   	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3375)
   	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3908)
   	at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:107)
   	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
   	at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
   	at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
   	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
   	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344)
   	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
   	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
   	at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1402)
   	at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:493)
   	at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3285)
   	at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2420)
   	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:449)
   	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183)
   	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40)
   	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281)
   	at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
   	at org.springframework.orm.hibernate5.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:643)
   	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:743)
   	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711)
   	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654)
   	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407)
   	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
   	at com.turvo.poc.service.ShardingService$$EnhancerBySpringCGLIB$$8c97b341.insertDemo(<generated>)
   	at com.turvo.poc.ShardingDatabaseTableApplicationTests.loopTest(ShardingDatabaseTableApplicationTests.java:137)
   	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:498)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
   	at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
   	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
   	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
   	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
   	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
   	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
   	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
   	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
   	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
   	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
   	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
   	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
   	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
   	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
   	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)`
       
       
       Here is my table structure :
       
   `CREATE TABLE IF NOT EXISTS staff_ ( 
   id varchar(40) NOT NULL PRIMARY KEY, 
   age int(3) DEFAULT NULL, 
   name varchar(25) DEFAULT NULL, 
   gender varchar(25) DEFAULT NULL
   )ENGINE=InnoDB;`
       
    @terrymanu 
       


-- 
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


[GitHub] [shardingsphere] lwk595ww commented on issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

Posted by GitBox <gi...@apache.org>.
lwk595ww commented on issue #21119:
URL: https://github.com/apache/shardingsphere/issues/21119#issuecomment-1254624167

   Normally, INSERT statements are accurate to only one shard


-- 
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


[GitHub] [shardingsphere] SHADOW-LI0327 commented on issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

Posted by GitBox <gi...@apache.org>.
SHADOW-LI0327 commented on issue #21119:
URL: https://github.com/apache/shardingsphere/issues/21119#issuecomment-1293154411

   same issue
   ```yam
   - !SHARDING
       tables:
         t_order: 
           actualDataNodes: ds_${0..1}.t_order_${1..12}
           keyGenerateStrategy:
             column: id
             keyGeneratorName: snowflake
       defaultDatabaseStrategy:
         standard:
           shardingColumn: id
           shardingAlgorithmName: database-inline
       defaultTableStrategy: 
         standard:
           shardingColumn: create_time
           shardingAlgorithmName: date-interval
   ```
   if `actualDataNodes` set `ds_0.t_order_${1..12}` works
   the `databaseStrategy` not working ?
   
   


-- 
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


[GitHub] [shardingsphere] VincentSleepless commented on issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

Posted by GitBox <gi...@apache.org>.
VincentSleepless commented on issue #21119:
URL: https://github.com/apache/shardingsphere/issues/21119#issuecomment-1366358870

   > same issue
   > 
   > ```
   > - !SHARDING
   >     tables:
   >       t_order: 
   >         actualDataNodes: ds_${0..1}.t_order_${1..12}
   >         keyGenerateStrategy:
   >           column: id
   >           keyGeneratorName: snowflake
   >     defaultDatabaseStrategy:
   >       standard:
   >         shardingColumn: id
   >         shardingAlgorithmName: database-inline
   >     defaultTableStrategy: 
   >       standard:
   >         shardingColumn: create_time
   >         shardingAlgorithmName: date-interval
   > ```
   > 
   > if `actualDataNodes` set `ds_0.t_order_${1..12}` works the `databaseStrategy` not working ?
   
   try ds_0.t_order_${1..6}, ds_1.t_order_${7..12}


-- 
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


[GitHub] [shardingsphere] SHADOW-LI0327 commented on issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

Posted by GitBox <gi...@apache.org>.
SHADOW-LI0327 commented on issue #21119:
URL: https://github.com/apache/shardingsphere/issues/21119#issuecomment-1366497949

   > > same issue
   > > ```
   > > - !SHARDING
   > >     tables:
   > >       t_order: 
   > >         actualDataNodes: ds_${0..1}.t_order_${1..12}
   > >         keyGenerateStrategy:
   > >           column: id
   > >           keyGeneratorName: snowflake
   > >     defaultDatabaseStrategy:
   > >       standard:
   > >         shardingColumn: id
   > >         shardingAlgorithmName: database-inline
   > >     defaultTableStrategy: 
   > >       standard:
   > >         shardingColumn: create_time
   > >         shardingAlgorithmName: date-interval
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > if `actualDataNodes` set `ds_0.t_order_${1..12}` works the `databaseStrategy` not working ?
   > 
   > try ds_0.t_order_${1..6}, ds_1.t_order_${7..12}
   
   `algorithm-expression` make me confused,finally i use ide plugin test script,my config is bellow,it's worded
   
   ```yml
   actualDataNodes: ds_${0..1}.t_order_${1..12}
   algorithm-expression: ds_${System.currentTimeMillis() % 2}
   algorithm-expression: t_order_${new Date().month + 1}
   ```
   
   still testing, but thanks


-- 
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


[GitHub] [shardingsphere] mahesh001 commented on issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

Posted by GitBox <gi...@apache.org>.
mahesh001 commented on issue #21119:
URL: https://github.com/apache/shardingsphere/issues/21119#issuecomment-1254021654

   `java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.
   
   	at com.google.common.base.Preconditions.checkState(Preconditions.java:508)
   	at org.apache.shardingsphere.sharding.route.engine.validator.dml.impl.ShardingInsertStatementValidator.postValidate(ShardingInsertStatementValidator.java:101)
   	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.lambda$createRouteContext$1(ShardingSQLRouter.java:57)
   	at java.util.Optional.ifPresent(Optional.java:159)
   	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:57)
   	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:44)
   	at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:73)
   	at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:53)
   	at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.route(KernelProcessor.java:54)
   	at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:46)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createExecutionContext(ShardingSpherePreparedStatement.java:470)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.executeUpdate(ShardingSpherePreparedStatement.java:309)
   	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
   	at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46)
   	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3375)
   	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3908)
   	at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:107)
   	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
   	at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
   	at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
   	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
   	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344)
   	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
   	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
   	at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1402)
   	at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:493)
   	at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3285)
   	at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2420)
   	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:449)
   	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183)
   	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40)
   	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281)
   	at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
   	at org.springframework.orm.hibernate5.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:643)
   	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:743)
   	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711)
   	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654)
   	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407)
   	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
   	at com.turvo.poc.service.ShardingService$$EnhancerBySpringCGLIB$$4bbe4120.insertDemo(<generated>)
   	at com.turvo.poc.ShardingDatabaseTableApplicationTests.sixTest(ShardingDatabaseTableApplicationTests.java:109)
   	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:498)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
   	at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
   	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
   	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
   	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
   	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
   	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
   	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
   	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
   	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
   	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
   	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
   	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
   	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
   	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
   	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
   `


-- 
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


[GitHub] [shardingsphere] github-actions[bot] closed issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.
URL: https://github.com/apache/shardingsphere/issues/21119


-- 
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


[GitHub] [shardingsphere] linghengqian commented on issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #21119:
URL: https://github.com/apache/shardingsphere/issues/21119#issuecomment-1738308364

   - This issue was solved in a more intuitive way in ShardingSphere 5.4.0, and errors should no longer be reported now.
   
   - The new SPI was introduced in the related PR at https://github.com/apache/shardingsphere/issues/22899 , some issue can now define `List<String>` via an new Row Value Expression SPI implementation in ShardingSphere 5.4.2.
   
   - If there is a problem, you can still open a new issue with a minimum reproducible example.
   
   


-- 
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


[GitHub] [shardingsphere] github-actions[bot] commented on issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #21119:
URL: https://github.com/apache/shardingsphere/issues/21119#issuecomment-1272348314

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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


[GitHub] [shardingsphere] linghengqian closed issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.

Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian closed issue #21119: org.springframework.dao.InvalidDataAccessApiUsageException: Insert statement does not support sharding table routing to multiple data nodes.; nested exception is java.lang.IllegalStateException: Insert statement does not support sharding table routing to multiple data nodes.
URL: https://github.com/apache/shardingsphere/issues/21119


-- 
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