java.sql.SQLNonTransientException: find no Route:SELECT * FROM `wechat`.`activities` LIMIT 0 java.sql.SQLNonTransientException: find no Route:SELECT * FROM `wechat`.`activities` LIMIT 0

GitHub | Kagamine | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    GitHub comment 1082#244283304

    GitHub | 9 months ago | Kagamine
    java.sql.SQLNonTransientException: find no Route:SELECT * FROM `wechat`.`activities` LIMIT 0 java.sql.SQLNonTransientException: find no Route:SELECT * FROM `wechat`.`activities` LIMIT 0
  2. 0

    GitHub comment 1172#265123683

    GitHub | 6 months ago | gaojingsong
    java.sql.SQLNonTransientException: can't find table define in schema ID schema:TESTDB
  3. 0

    异常 find no Route

    GitHub | 5 months ago | githublaohu
    java.sql.SQLNonTransientException: find no Route:SELECT * FROM `vp_user_800000001`.`vp_user_info` LIMIT 0
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 1431#293143308

    GitHub | 1 month ago | nimei1248
    java.sql.SQLNonTransientException: find no Route:SELECT * FROM `user_a01`.`t2` LIMIT 0 也就是上面说的第2个问题 这个问题目前测试结果是: **当使用navicat执行的select语句中包含主键字段,就会报错如上;mysql命令行客户端不会** **下面是测试过程:** **mysql命令行客户端:** mysql> desc t2\G *************************** 1. row *************************** Field: id Type: int(11) Null: NO **Key: PRI** Default: NULL Extra: *************************** 2. row *************************** Field: name Type: varchar(4) Null: NO Key: Default: NULL Extra: 2 rows in set (0.02 sec) mysql> select id,name from t2\G *************************** 1. row *************************** id: 1 name: a *************************** 2. row *************************** id: 2 name: b *************************** 3. row *************************** id: 3 name: c 3 rows in set (0.00 sec) **mycat日志:** 2017-04-11 11:46:43.689 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.net.FrontendConnection.query(FrontendConnection.java:288)) - ServerConnection [id=14, schema=ucenter, host=10.66.72.174, user=test,txIsolation=3, autocommit=true, schema=ucenter] select id,name from t2 2017-04-11 11:46:43.689 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.server.ServerQueryHandler.query(ServerQueryHandler.java:57)) - ServerConnection [id=14, schema=ucenter, host=10.66.72.174, user=test,txIsolation=3, autocommit=true, schema=ucenter]select id,name from t2 2017-04-11 11:46:43.689 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.cache.impl.EnchachePool.get(EnchachePool.java:71)) - SQLRouteCache hit cache ,key:ucenterselect id,name from t2 2017-04-11 11:46:43.689 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.server.NonBlockingSession.execute(NonBlockingSession.java:110)) - ServerConnection [id=14, schema=ucenter, host=10.66.72.174, user=test,txIsolation=3, autocommit=true, schema=ucenter]s**elect id,name from t2, route={ 1 -> dn1{SELECT id, name FROM t2 LIMIT 10000} } rrs** 2017-04-11 11:46:43.689 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.backend.mysql.nio.handler.SingleNodeHandler.execute(SingleNodeHandler.java:166)) - rrs.getRunOnSlave() null 2017-04-11 11:46:43.690 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.backend.mysql.nio.handler.SingleNodeHandler.execute(SingleNodeHandler.java:168)) - node.getRunOnSlave() null 2017-04-11 11:46:43.690 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.backend.mysql.nio.handler.SingleNodeHandler.execute(SingleNodeHandler.java:177)) - node.getRunOnSlave() null 2017-04-11 11:46:43.690 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.backend.mysql.nio.handler.SingleNodeHandler.execute(SingleNodeHandler.java:177)) - node.getRunOnSlave() null 2017-04-11 11:46:43.690 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.backend.mysql.nio.handler.SingleNodeHandler.execute(SingleNodeHandler.java:179)) - node.getRunOnSlave() null 2017-04-11 11:46:43.690 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.backend.datasource.PhysicalDBNode.getConnection(PhysicalDBNode.java:96)) - rrs.getRunOnSlave() null 2017-04-11 11:46:43.690 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.backend.datasource.PhysicalDBNode.getConnection(PhysicalDBNode.java:96)) - rrs.getRunOnSlave() null 2017-04-11 11:46:43.690 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.backend.datasource.PhysicalDBNode.getConnection(PhysicalDBNode.java:127)) - rrs.getRunOnSlave() null 2017-04-11 11:46:43.690 DEBUG [$_NIOREACTOR-5-RW] (io.mycat.backend.datasource.PhysicalDBPool.getRWBanlanceCon(PhysicalDBPool.java:456)) - select read source host1_M1 for dataHost:host1_inst1 FROM t2 LIMIT 10000}, respHandler=SingleNodeHandler [node=dn1{SELECT id, name FROM t2 LIMIT 10000}, packetId=7], host=10.66.72.176, port=4311, statusSync=null, writeQueue=0, modifiedSQLExecuted=false] =false] **mysql gui navicat测试: 1.全部字段,包含主键** ![mycat12](https://cloud.githubusercontent.com/assets/23753020/24892142/49edaace-1e48-11e7-83a8-a02923345bc1.jpg) **mycat日志:** 2017-04-11 11:47:36.596 DEBUG [$_NIOREACTOR-3-RW] (io.mycat.server.ServerQueryHandler.query(ServerQueryHandler.java:57)) - ServerConnection [id=13, schema=ucenter, host=10.5.9.22, user=test,txIsolation=3, autocommit=true, schema=ucenter]SELECT * FROM `user_a01`.`t2` LIMIT 0 2017-04-11 11:47:36.597 DEBUG [$_NIOREACTOR-3-RW] (io.mycat.cache.impl.EnchachePool.get(EnchachePool.java:77)) - SQLRouteCache miss cache ,key:ucenterSELECT * FROM `user_a01`.`t2` LIMIT 0 2017-04-11 11:47:36.597 WARN [$_NIOREACTOR-3-RW] **(io.mycat.route.parser.druid.impl.DruidSelectParser.tryRoute(DruidSelectParser.java:436)) - find no Route:SELECT * FROM `user_a01`.`t2` LIMIT 0** 2017-04-11 11:47:36.597 WARN [$_NIOREACTOR-3-RW] (io.mycat.server.ServerConnection.routeEndExecuteSQL(ServerConnection.java:281)) - ServerConnection [id=13, schema=ucenter, host=10.5.9.22, user=test,txIsolation=3, autocommit=true, schema=ucenter]SELECT * FROM `user_a01`.`t2` LIMIT 0 err:java.sql.SQLNonTransientException: find no Route:SELECT * FROM `user_a01`.`t2` LIMIT 0 **java.sql.SQLNonTransientException: find no Route:SELECT * FROM `user_a01`.`t2` LIMIT 0**
  6. 0

    1.6 表关联和配置问题

    GitHub | 3 months ago | wengad82
    java.sql.SQLNonTransientException: can't find table define in schema T_FUNC_CTR schema:CRDB

    Root Cause Analysis

    1. java.sql.SQLNonTransientException

      find no Route:SELECT * FROM `wechat`.`activities` LIMIT 0 java.sql.SQLNonTransientException: find no Route:SELECT * FROM `wechat`.`activities` LIMIT 0

      at io.mycat.route.parser.druid.impl.DruidSelectParser.tryRoute()
    2. io.mycat.route
      RouteService.route
      1. io.mycat.route.parser.druid.impl.DruidSelectParser.tryRoute(DruidSelectParser.java:437)
      2. io.mycat.route.parser.druid.impl.DruidSelectParser.changeSql(DruidSelectParser.java:287)
      3. io.mycat.route.parser.druid.impl.DefaultDruidParser.parser(DefaultDruidParser.java:67)
      4. io.mycat.route.impl.DruidMycatRouteStrategy.routeNormalSqlWithAST(DruidMycatRouteStrategy.java:77)
      5. io.mycat.route.impl.AbstractRouteStrategy.route(AbstractRouteStrategy.java:81)
      6. io.mycat.route.RouteService.route(RouteService.java:133)
      6 frames
    3. io.mycat.server
      ServerQueryHandler.query
      1. io.mycat.server.ServerConnection.routeEndExecuteSQL(ServerConnection.java:260)
      2. io.mycat.server.ServerConnection.execute(ServerConnection.java:209)
      3. io.mycat.server.handler.SelectHandler.handle(SelectHandler.java:105)
      4. io.mycat.server.ServerQueryHandler.query(ServerQueryHandler.java:79)
      4 frames
    4. io.mycat.net
      NIOReactor$RW.run
      1. io.mycat.net.FrontendConnection.query(FrontendConnection.java:317)
      2. io.mycat.net.FrontendConnection.query(FrontendConnection.java:337)
      3. io.mycat.net.handler.FrontendCommandHandler.handle(FrontendCommandHandler.java:71)
      4. io.mycat.net.FrontendConnection.rawHandle(FrontendConnection.java:462)
      5. io.mycat.net.FrontendConnection.handle(FrontendConnection.java:444)
      6. io.mycat.net.AbstractConnection.onReadData(AbstractConnection.java:321)
      7. io.mycat.net.NIOSocketWR.asynRead(NIOSocketWR.java:190)
      8. io.mycat.net.AbstractConnection.asynRead(AbstractConnection.java:273)
      9. io.mycat.net.NIOReactor$RW.run(NIOReactor.java:102)
      9 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame