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/09/07 09:04:19 UTC
[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
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