Mycat批量插入报错
批量插入使用注解
/*!mycat:catlet=demo.catlets.BatchInsertSequence */ INSERT INTO unit (id,name) VALUES (next VALUE FOR UNIT,'1'), (next VALUE FOR UNIT,'2'), (next VALUE FOR UNIT,'3'), (next VALUE FOR UNIT,'4')
查看日志报错
05/19 10:20:10.034 ERROR [$_NIOREACTOR-4-RW] (BatchInsertSequence.java:119) -BatchInsertSequence.route(......) java.lang.NullPointerException at demo.catlets.BatchInsertSequence.route(BatchInsertSequence.java:87) at org.opencloudb.route.handler.HintCatletHandler.route(HintCatletHandler.java:52) at org.opencloudb.route.RouteService.route(RouteService.java:107) at org.opencloudb.server.ServerConnection.routeEndExecuteSQL(ServerConnection.java:201) at org.opencloudb.server.ServerConnection.execute(ServerConnection.java:154) at org.opencloudb.server.ServerQueryHandler.query(ServerQueryHandler.java:120) at org.opencloudb.net.FrontendConnection.query(FrontendConnection.java:319) at org.opencloudb.net.handler.FrontendCommandHandler.handle(FrontendCommandHandler.java:71) at org.opencloudb.net.FrontendConnection.rawHandle(FrontendConnection.java:456) at org.opencloudb.net.FrontendConnection.handle(FrontendConnection.java:434) at org.opencloudb.net.AbstractConnection.onReadData(AbstractConnection.java:307) at org.opencloudb.net.NIOSocketWR.asynRead(NIOSocketWR.java:186) at org.opencloudb.net.AbstractConnection.asynRead(AbstractConnection.java:268) at org.opencloudb.net.NIOReactor$RW.run(NIOReactor.java:96) at java.lang.Thread.run(Thread.java:745) 05/19 10:20:10.035 ERROR [$_NIOREACTOR-4-RW] (BatchInsertSequence.java:131) -BatchInsertSequence.getRoute(String sql) java.lang.NullPointerException 05/19 10:20:10.036 ERROR [$_NIOREACTOR-4-RW] (BatchInsertSequence.java:64) -BatchInsertSequence.processSQL(String sql, EngineCtx ctx) java.lang.NullPointerException at demo.catlets.BatchInsertSequence.processSQL(BatchInsertSequence.java:52) at org.opencloudb.route.handler.HintCatletHandler.route(HintCatletHandler.java:53) at org.opencloudb.route.RouteService.route(RouteService.java:107) at org.opencloudb.server.ServerConnection.routeEndExecuteSQL(ServerConnection.java:201) at org.opencloudb.server.ServerConnection.execute(ServerConnection.java:154) at org.opencloudb.server.ServerQueryHandler.query(ServerQueryHandler.java:120) at org.opencloudb.net.FrontendConnection.query(FrontendConnection.java:319) at org.opencloudb.net.handler.FrontendCommandHandler.handle(FrontendCommandHandler.java:71) at org.opencloudb.net.FrontendConnection.rawHandle(FrontendConnection.java:456) at org.opencloudb.net.FrontendConnection.handle(FrontendConnection.java:434) at org.opencloudb.net.AbstractConnection.onReadData(AbstractConnection.java:307) at org.opencloudb.net.NIOSocketWR.asynRead(NIOSocketWR.java:186) at org.opencloudb.net.AbstractConnection.asynRead(AbstractConnection.java:268) at org.opencloudb.net.NIOReactor$RW.run(NIOReactor.java:96) at java.lang.Thread.run(Thread.java:745)
何解?求大神解答,是我的语句有问题吗
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能是没找到对应的序列值,你用的本地文件方式还是数据库的方式?
不支持insert into