{"record":{"id":"85de8438bce64c11","repo":"apache/shardingsphere","slug":"30","errorCode":"30","errorMessage":"No tableless route info found.","messagePattern":"No tableless route info found\\.","errorType":"exception","errorClass":"NoTablelessRouteInfoException","httpStatus":null,"severity":"error","filePath":"infra/route/core/src/main/java/org/apache/shardingsphere/infra/route/engine/tableless/TablelessRouteEngineFactory.java","lineNumber":82,"sourceCode":"     * @throws NoTablelessRouteInfoException if the SQL statement is not supported by tableless route engine\n     */\n    public static TablelessRouteEngine newInstance(final QueryContext queryContext, final ShardingSphereDatabase database) {\n        SQLStatement sqlStatement = queryContext.getSqlStatementContext().getSqlStatement();\n        if (sqlStatement instanceof DMLStatement) {\n            return getDMLRouteEngine(queryContext.getSqlStatementContext());\n        }\n        if (sqlStatement instanceof DDLStatement) {\n            return getDDLRouteEngine(queryContext.getSqlStatementContext(), database);\n        }\n        // TODO remove this logic when proxy and jdbc support all dal statement @duanzhengqiang\n        if (sqlStatement instanceof DALStatement) {\n            return getDALRouteEngine((DALStatement) sqlStatement, database);\n        }\n        // TODO Support more TCL statements by transaction module, then remove this.\n        if (sqlStatement instanceof TCLStatement) {\n            return new TablelessDataSourceBroadcastRouteEngine();\n        }\n        throw new NoTablelessRouteInfoException();\n    }\n    \n    private static TablelessRouteEngine getDMLRouteEngine(final SQLStatementContext sqlStatementContext) {\n        if (sqlStatementContext instanceof SelectStatementContext) {\n            return new TablelessDataSourceUnicastRouteEngine();\n        }\n        throw new NoTablelessRouteInfoException();\n    }\n    \n    private static TablelessRouteEngine getDDLRouteEngine(final SQLStatementContext sqlStatementContext, final ShardingSphereDatabase database) {\n        if (sqlStatementContext.getSqlStatement().getAttributes().findAttribute(CursorSQLStatementAttribute.class).isPresent()) {\n            return getCursorRouteEngine(sqlStatementContext.getSqlStatement(), database);\n        }\n        SQLStatement sqlStatement = sqlStatementContext.getSqlStatement();\n        if (isFunctionDDLStatement(sqlStatement) || isSchemaDDLStatement(sqlStatement)) {\n            return new TablelessDataSourceBroadcastRouteEngine();\n        }\n        throw new NoTablelessRouteInfoException();","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/infra/route/core/src/main/java/org/apache/shardingsphere/infra/route/engine/tableless/TablelessRouteEngineFactory.java#L64-L100","documentation":"TablelessRouteEngineFactory.newInstance routes statements that touch no logical table. After checking DML, DDL, DAL (with a TODO noting incomplete coverage), and TCL, any remaining statement category falls through to NoTablelessRouteInfoException (error code 30) — ShardingSphere has no tableless routing strategy for that statement type against the target database.","triggerScenarios":"Executing a statement in a database with no logical tables where the statement is not DML/DDL/DAL/TCL — e.g. certain administration or utility statements (_replicaof, LOCK/UNLOCK variants not classified as DAL) that reach the tableless router.","commonSituations":"Pointing a client at a ShardingSphere logical database that has no tables yet (fresh setup) and running session/admin utilities; HA failover tools issuing database-specific commands; statements whose parser classification changed between versions.","solutions":["Run the statement against a logical database that actually contains tables, or route it directly to the underlying datasource bypassing ShardingSphere.","Add at least one logical table (or a single-table rule) so the statement routes through the table-based router.","Upgrade ShardingSphere — tableless statement coverage is actively expanding (see the TODOs) — and check release notes for your statement type."],"exampleFix":"# before: logical DB has no tables\nREPLICAOF node2 6379;  # utility statement hits tableless router -> NoTablelessRouteInfoException\n\n# after: connect to the physical storage unit directly for admin/utility statements","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { route(engine, queryContext); } catch (NoTablelessRouteInfoException e) { /* route statement directly to a storage unit */ }","preventionTips":["Run admin/utility statements directly on storage units, not through a tableless logical database.","Ensure the logical database has tables/rules before pointing clients at it."],"tags":["routing","tableless","statement-support"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}