booingdu opened a new issue #8226:
URL: https://github.com/apache/shardingsphere/issues/8226
SQL语句如下:
replace into t_activity(userId, date)values(#{userId},#{date})
2020-11-19 18:31:29.876 [1;31mERROR[m[http-nio-10024-exec-5]
[36morg.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet][m
: Servlet.service() for servlet [dispatcherServlet] in context with path []
threw exception [Request processing failed; nested exception is
org.mybatis.spring.MyBatisSystemException: nested exception is
org.apache.ibatis.executor.ExecutorException: Error preparing statement.
Cause: java.lang.ClassCastException:
org.apache.shardingsphere.sql.parser.sql.statement.dml.InsertStatement cannot
be cast to
org.apache.shardingsphere.sql.parser.sql.statement.dml.ReplaceStatement] with
root cause
java.lang.ClassCastException:
org.apache.shardingsphere.sql.parser.sql.statement.dml.InsertStatement cannot
be cast to
org.apache.shardingsphere.sql.parser.sql.statement.dml.ReplaceStatement
at
org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitReplace(MySQLDMLVisitor.java:163)
~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.sql.parser.mysql.visitor.impl.MySQLDMLVisitor.visitReplace(MySQLDMLVisitor.java:127)
~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.sql.parser.autogen.MySQLStatementParser$ReplaceContext.accept(MySQLStatementParser.java:1471)
~[shardingsphere-sql-parser-mysql-4.1.1.jar:4.1.1]
at
org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
~[antlr4-runtime-4.7.2.jar:4.7.2]
at
org.apache.shardingsphere.sql.parser.SQLParserEngine.parse0(SQLParserEngine.java:80)
~[shardingsphere-sql-parser-engine-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.sql.parser.SQLParserEngine.parse(SQLParserEngine.java:61)
~[shardingsphere-sql-parser-engine-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.underlying.route.DataNodeRouter.createRouteContext(DataNodeRouter.java:97)
~[shardingsphere-route-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.underlying.route.DataNodeRouter.executeRoute(DataNodeRouter.java:89)
~[shardingsphere-route-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.underlying.route.DataNodeRouter.route(DataNodeRouter.java:76)
~[shardingsphere-route-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.underlying.pluggble.prepare.PreparedQueryPrepareEngine.route(PreparedQueryPrepareEngine.java:54)
~[shardingsphere-pluggable-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.executeRoute(BasePrepareEngine.java:96)
~[shardingsphere-pluggable-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.underlying.pluggble.prepare.BasePrepareEngine.prepare(BasePrepareEngine.java:83)
~[shardingsphere-pluggable-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.MasterSlavePreparedStatement.<init>(MasterSlavePreparedStatement.java:65)
~[sharding-jdbc-core-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.MasterSlavePreparedStatement.<init>(MasterSlavePreparedStatement.java:53)
~[sharding-jdbc-core-4.1.1.jar:4.1.1]
at
org.apache.shardingsphere.shardingjdbc.jdbc.core.connection.MasterSlaveConnection.prepareStatement(MasterSlaveConnection.java:79)
~[sharding-jdbc-core-4.1.1.jar:4.1.1]
at sun.reflect.GeneratedMethodAccessor211.invoke(Unknown Source) ~[?:?]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_211]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_211]
at
org.apache.ibatis.logging.jdbc.ConnectionLogger.invoke(ConnectionLogger.java:55)
~[mybatis-3.4.4.jar:3.4.4]
at com.sun.proxy.$Proxy256.prepareStatement(Unknown Source) ~[?:?]
at
org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:85)
~[mybatis-3.4.4.jar:3.4.4]
at
org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88)
~[mybatis-3.4.4.jar:3.4.4]
at
org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:59)
~[mybatis-3.4.4.jar:3.4.4]
at
org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:85)
~[mybatis-3.4.4.jar:3.4.4]
at
org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:49)
~[mybatis-3.4.4.jar:3.4.4]
at
org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
~[mybatis-3.4.4.jar:3.4.4]
at
org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
~[mybatis-3.4.4.jar:3.4.4]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_211]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_211]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_211]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_211]
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
~[mybatis-3.4.4.jar:3.4.4]
at com.sun.proxy.$Proxy255.update(Unknown Source) ~[?:?]
at
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
~[mybatis-3.4.4.jar:3.4.4]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_211]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_211]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_211]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_211]
at
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
~[mybatis-spring-1.3.1.jar:1.3.1]
at com.sun.proxy.$Proxy128.update(Unknown Source) ~[?:?]
at
org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:294)
~[mybatis-spring-1.3.1.jar:1.3.1]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)
~[mybatis-3.4.4.jar:3.4.4]
----------------------------------------------------------------
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:
[email protected]