批量插入使用注解
/*!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)何解?求大神解答,是我的语句有问题吗
不支持insertinto
可能是没找到对应的序列值,你用的本地文件方式还是数据库的方式?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。