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/05/27 15:42:36 UTC

[GitHub] [shardingsphere] xfyang1988 opened a new issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

xfyang1988 opened a new issue #5813:
URL: https://github.com/apache/shardingsphere/issues/5813


   shardingsphere 4.0.1 is ok, but 4.1.0 throws an exception?
   
   shardingsphere : 4.1.0
   
   SQL:  update ic_goods_occupy_record set actual_amount = pre_amount, pre_amount = 0, version = version + 1, update_time = now() ,update_person = ? where biz_bill_no = ? or orig_bill_no = ? and is_deleted = 0
   
   org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment ### T The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: update ic_goods_occupy_record set actual_amount = pre_amount, pre_amount = 0, version = version + 1, update_time = now() ,update_person = ? where biz_bill_no = ? or orig_bill_no = ? and is_deleted = 0 ### Cause: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:78) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440) at com.sun.proxy.$Proxy73.update(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:287) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:67) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:57) at com.sun.proxy.$Proxy107.updateActualAmountByOrderNo(Unknown Source) at com.ncarzone.saleinventory.biz.component.goodinv.GoodsOccupyRecordComponent.updateActualAmountByOrderNo(GoodsOccupyRecordComponent.java:60) at com.ncarzone.saleinventory.biz.component.goodinv.GoodsOccupyRecordComponent$$FastClassBySpringCGLIB$$fc1b0c75.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:174) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:174) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) at com.ncarzone.saleinventory.biz.service.selfinv.impl.SelfInventoryOperateServiceImpl$$EnhancerBySpringCGLIB$$6a5dec24.deductSelfInventory() at com.ncarzone.saleinventory.biz.component.message.selfinv.SelfDeductionInventoryService.handle(SelfDeductionInventoryService.java:50) at com.ncarzone.saleinventory.biz.component.goodinv.SelfInvChangeMessageComponent.changeInventory(SelfInvChangeMessageComponent.java:87) at com.ncarzone.saleinventory.biz.component.goodinv.SelfInvChangeMessageComponent$$FastClassBySpringCGLIB$$a95738dd.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) at com.carzone.zookeeper.lock.CarzoneLockAspect.doCarzoneLockAspect(CarzoneLockAspect.java:109) at sun.reflect.GeneratedMethodAccessor571.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:174) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) at com.ncarzone.saleinventory.biz.component.goodinv.SelfInvChangeMessageComponent$$EnhancerBySpringCGLIB$$be46a915.changeInventory() at com.ncarzone.saleinventory.biz.mq.consumer.selfInv.SelfInvChangeMessageListener.doConsume(SelfInvChangeMessageListener.java:38) at com.ncarzone.saleinventory.biz.mq.consumer.base.AbstractBaseMessageListener.consume(AbstractBaseMessageListener.java:42) at com.aliyun.openservices.ons.api.impl.rocketmq.ConsumerImpl$MessageListenerImpl.consumeMessage(ConsumerImpl.java:101) at com.aliyun.openservices.shade.com.alibaba.rocketmq.client.impl.consumer.ConsumeMessageConcurrentlyService.consumeMessageDirectly(ConsumeMessageConcurrentlyService.java:167) at com.aliyun.openservices.shade.com.alibaba.rocketmq.client.impl.factory.MQClientInstance.consumeMessageDirectly(MQClientInstance.java:1257) at com.aliyun.openservices.shade.com.alibaba.rocketmq.client.impl.ClientRemotingProcessor.consumeMessageDirectly(ClientRemotingProcessor.java:200) at com.aliyun.openservices.shade.com.alibaba.rocketmq.client.impl.ClientRemotingProcessor.processRequest(ClientRemotingProcessor.java:78) at com.aliyun.openservices.shade.com.alibaba.rocketmq.remoting.netty.NettyRemotingAbstract$1.run(NettyRemotingAbstract.java:192) at com.aliyun.openservices.shade.com.alibaba.rocketmq.remoting.netty.RequestTask.run(RequestTask.java:80) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment ### The error may exist in URL [jar:file:/data/webapps/ROOT/WEB-INF/lib/ncarzone-saleinventory-dal-1.1.3.jar!/com/ncarzone/saleinventory/dal/mapper/biz/IcGoodsOccupyRecordBizMapper.xml] ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: update ic_goods_occupy_record set actual_amount = pre_amount, pre_amount = 0, version = version + 1, update_time = now() ,update_person = ? where biz_bill_no = ? or orig_bill_no = ? and is_deleted = 0 ### Cause: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199) at sun.reflect.GeneratedMethodAccessor640.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) ... 76 more Caused by: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitAssignment(MySQLDMLVisitor.java:242) at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitAssignment(MySQLDMLVisitor.java:127) at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$AssignmentContext.accept(MySQLStatementParser.java:1753) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSetAssignmentsClause(MySQLDMLVisitor.java:225) at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSetAssignmentsClause(MySQLDMLVisitor.java:127) at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SetAssignmentsClauseContext.accept(MySQLStatementParser.java:1801) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitUpdate(MySQLDMLVisitor.java:213) at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitUpdate(MySQLDMLVisitor.java:127) at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$UpdateContext.accept(MySQLStatementParser.java:1622) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse0(SQLParserEngine.java:80) at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse(SQLParserEngine.java:61) at org.apache.shardingsphere.underlying.route.DataNodeRouter.createRouteContext(DataNodeRouter.java:97) at org.apache.shardingsphere.underlying.route.DataNodeRouter.executeRoute(DataNodeRouter.java:89) at org.apache.shardingsphere.underlying.route.DataNodeRouter.route(DataNodeRouter.java:76) at org.apache.shardingsphere.underlying.pluggble.prepare.PreparedQueryPrepareEngine.route(PreparedQueryPrepareEngine.java:54) at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.executeRoute(BasePrepareEngine.java:96) at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.prepare(BasePrepareEngine.java:83) at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.prepare(ShardingPreparedStatement.java:183) at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:143) at sun.reflect.GeneratedMethodAccessor305.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) at com.sun.proxy.$Proxy89.execute(Unknown Source) at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) at sun.reflect.GeneratedMethodAccessor362.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49) at com.carzone.db.routing.interceptor.SqlStatementInterceptor.intercept(SqlStatementInterceptor.java:64) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) at com.sun.proxy.$Proxy88.update(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197) ... 80 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



[GitHub] [shardingsphere] terrymanu commented on issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

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


   The SQL
   
   ```
    update ic_goods_occupy_record set actual_amount = pre_amount, pre_amount = 0, version = version + 1, update_time = now() ,update_person = ? where biz_bill_no = ? or orig_bill_no = ? and is_deleted = 0
   ```
   
   is one SQL in same request or 2 different request?


----------------------------------------------------------------
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] kimmking edited a comment on issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #5813:
URL: https://github.com/apache/shardingsphere/issues/5813#issuecomment-635139256


   we will fix it in 4.1.1  @jingshanglu 


----------------------------------------------------------------
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] Anricx commented on issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

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


   ### The error occurred while setting parameters
   ### SQL: UPDATE `_device_transmit`          SET `status` = 1 AND             `transmit_time` = NOW()           WHERE `id` = ? AND `status` = 0
   ### Cause: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.predicate.OrPredicateSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
   	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
   	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.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
   	... 39 more
   Caused by: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.predicate.OrPredicateSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitAssignment(MySQLDMLVisitor.java:242)
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitAssignment(MySQLDMLVisitor.java:127)
   	at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$AssignmentContext.accept(MySQLStatementParser.java:1753)
   	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSetAssignmentsClause(MySQLDMLVisitor.java:225)
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSetAssignmentsClause(MySQLDMLVisitor.java:127)
   	at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SetAssignmentsClauseContext.accept(MySQLStatementParser.java:1801)
   	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitUpdate(MySQLDMLVisitor.java:213)
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitUpdate(MySQLDMLVisitor.java:127)
   	at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$UpdateContext.accept(MySQLStatementParser.java:1622)
   	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
   	at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse0(SQLParserEngine.java:80)
   	at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse(SQLParserEngine.java:61)
   	at org.apache.shardingsphere.underlying.route.DataNodeRouter.createRouteContext(DataNodeRouter.java:97)
   	at org.apache.shardingsphere.underlying.route.DataNodeRouter.executeRoute(DataNodeRouter.java:89)
   	at org.apache.shardingsphere.underlying.route.DataNodeRouter.route(DataNodeRouter.java:76)
   	at org.apache.shardingsphere.underlying.pluggble.prepare.PreparedQueryPrepareEngine.route(PreparedQueryPrepareEngine.java:54)
   	at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.executeRoute(BasePrepareEngine.java:96)
   	at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.prepare(BasePrepareEngine.java:83)
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.prepare(ShardingPreparedStatement.java:183)
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:143)
   	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
   	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
   	at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
   	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
   	at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
   	... 44 more
   
   
   4.1.1 with error


----------------------------------------------------------------
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] kimmking closed issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #5813:
URL: https://github.com/apache/shardingsphere/issues/5813


   


----------------------------------------------------------------
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] kimmking commented on issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

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


   we will fix it in 4.1.1


----------------------------------------------------------------
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] Anricx removed a comment on issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

Posted by GitBox <gi...@apache.org>.
Anricx removed a comment on issue #5813:
URL: https://github.com/apache/shardingsphere/issues/5813#issuecomment-688174416


   ### The error occurred while setting parameters
   ### SQL: UPDATE `_device_transmit`          SET `status` = 1 AND             `transmit_time` = NOW()           WHERE `id` = ? AND `status` = 0
   ### Cause: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.predicate.OrPredicateSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
   	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
   	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.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
   	... 39 more
   Caused by: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.predicate.OrPredicateSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitAssignment(MySQLDMLVisitor.java:242)
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitAssignment(MySQLDMLVisitor.java:127)
   	at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$AssignmentContext.accept(MySQLStatementParser.java:1753)
   	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSetAssignmentsClause(MySQLDMLVisitor.java:225)
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSetAssignmentsClause(MySQLDMLVisitor.java:127)
   	at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SetAssignmentsClauseContext.accept(MySQLStatementParser.java:1801)
   	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitUpdate(MySQLDMLVisitor.java:213)
   	at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitUpdate(MySQLDMLVisitor.java:127)
   	at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$UpdateContext.accept(MySQLStatementParser.java:1622)
   	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
   	at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse0(SQLParserEngine.java:80)
   	at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse(SQLParserEngine.java:61)
   	at org.apache.shardingsphere.underlying.route.DataNodeRouter.createRouteContext(DataNodeRouter.java:97)
   	at org.apache.shardingsphere.underlying.route.DataNodeRouter.executeRoute(DataNodeRouter.java:89)
   	at org.apache.shardingsphere.underlying.route.DataNodeRouter.route(DataNodeRouter.java:76)
   	at org.apache.shardingsphere.underlying.pluggble.prepare.PreparedQueryPrepareEngine.route(PreparedQueryPrepareEngine.java:54)
   	at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.executeRoute(BasePrepareEngine.java:96)
   	at org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.prepare(BasePrepareEngine.java:83)
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.prepare(ShardingPreparedStatement.java:183)
   	at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:143)
   	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
   	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
   	at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
   	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
   	at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
   	... 44 more
   
   
   4.1.1 with error


----------------------------------------------------------------
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] kimmking commented on issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

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


   Could you post the shardingsphere exception stack?


----------------------------------------------------------------
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] xfyang1988 commented on issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

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


   > Could you post the shardingsphere exception stack?
   
   you can try it ? sql like this :
   update ic_goods_occupy_record set actual_amount = pre_amount, pre_amount = 0, version = version + 1, update_time = now() ,update_person = ? where biz_bill_no = ? or orig_bill_no = ? and is_deleted = 0
   


----------------------------------------------------------------
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] terrymanu removed a comment on issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

Posted by GitBox <gi...@apache.org>.
terrymanu removed a comment on issue #5813:
URL: https://github.com/apache/shardingsphere/issues/5813#issuecomment-635077217


   The SQL
   
   ```
    update ic_goods_occupy_record set actual_amount = pre_amount, pre_amount = 0, version = version + 1, update_time = now() ,update_person = ? where biz_bill_no = ? or orig_bill_no = ? and is_deleted = 0
   ```
   
   is one SQL in same request or 2 different request?


----------------------------------------------------------------
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] kimmking commented on issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

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


   I got it.
   
   ```
   [ERROR] 14:36:51.737 [ShardingSphere-Command-1] o.a.s.s.f.c.CommandExecutorTask - Exception occur:
   java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitAssignment(MySQLDMLVisitor.java:242)
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitAssignment(MySQLDMLVisitor.java:127)
           at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$AssignmentContext.accept(MySQLStatementParser.java:1753)
           at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSetAssignmentsClause(MySQLDMLVisitor.java:225)
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitSetAssignmentsClause(MySQLDMLVisitor.java:127)
           at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$SetAssignmentsClauseContext.accept(MySQLStatementParser.java:1801)
           at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitUpdate(MySQLDMLVisitor.java:213)
           at org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitUpdate(MySQLDMLVisitor.java:127)
           at org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$UpdateContext.accept(MySQLStatementParser.java:1622)
           at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
           at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse0(SQLParserEngine.java:80)
           at org.apache.shardingsphere.sql.parser.SQLParserEngine.parse(SQLParserEngine.java:61)
           at org.apache.shardingsphere.shardingproxy.backend.text.TextProtocolBackendHandlerFactory.newInstance(TextProtocolBackendHandlerFactory.java:69)
           at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.<init>(MySQLComQueryPacketExecutor.java:65)
           at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.MySQLCommandExecutorFactory.newInstance(MySQLCommandExecutorFactory.java:70)
           at org.apache.shardingsphere.shardingproxy.frontend.mysql.command.MySQLCommandExecuteEngine.getCommandExecutor(MySQLCommandExecuteEngine.java:59)
           at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:92)
           at org.apache.shardingsphere.shardingproxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:71)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
   
   ```


----------------------------------------------------------------
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] jingshanglu commented on issue #5813: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.expr.ExpressionSegment

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


   I'll track it.


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