{"record":{"id":"6a7c6a53ca2c2df4","repo":"MyCATApache/Mycat-Server","slug":"please-check-tablefile-properties-make-sure-schem","errorCode":null,"errorMessage":"please check tableFile.properties,make sure {schemaName}:{tableName} is sharding table ","messagePattern":"please check tableFile\\.properties,make sure (.+?):(.+?) is sharding table ","errorType":"exception","errorClass":"ConfigException","httpStatus":null,"severity":"error","filePath":"src/main/java/io/mycat/util/dataMigrator/ConfigComparer.java","lineNumber":169,"sourceCode":"\t\t\tSet<String> newSet = newTables.keySet();\n\t\t\tif(!oldSet.equals(newSet)){\n\t\t\t\tthrow new ConfigException(\"new & old table config is not equal!\");\n\t\t\t}\n\t\t\tfor(String tableName:oldSet){\n\t\t\t\tTableConfig oldTable = oldTables.get(tableName);\n\t\t\t\tTableConfig newTable = newTables.get(tableName);\n\t\t\t\tloadMigratorTable(oldTable, newTable,schemaName,tableName);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\t\n\t\n\tprivate void loadMigratorTable(TableConfig oldTable,TableConfig newTable,String schemaName,String tableName){\n\t\t//禁止配置非拆分表\n\t\tif(oldTable == null || newTable == null){\n\t\t\tthrow new ConfigException(\"please check tableFile.properties,make sure \"+schemaName+\":\"+tableName+\" is sharding table \");\n\t\t}\n\t\t//忽略全局表\n\t\tif(oldTable.isGlobalTable()||newTable.isGlobalTable()){\n\t\t\tString message = \"global table: \"+schemaName+\":\"+tableName+\" is ignore!\";\n\t\t\tSystem.out.println(\"Warn: \"+message);\n\t\t\tLOGGER.warn(message);\n\t\t}else{\n\t\t\tList<DataNode > oldDN = getDataNodes(oldTable,oldDataNodes,oldDataHosts);\n\t\t\tList<DataNode > newDN = getDataNodes(newTable,newDataNodes,newDataHosts);\n\t\t\t//忽略数据节点分布没有发生变化的表\n\t\t\tif(isNeedMigrate(oldDN,newDN)){\n\t\t\t\tLOGGER.info(\"old table:{}\",oldTable);\n\t\t\t\tLOGGER.info(\"new table:{}\",newTable);\n\t\t\t\tif (oldTable.getRule()== null){\n\t\t\t\t\tLOGGER.info(\"beacuse {} rule is null,skip it,check it is er child table\",oldTable);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (newTable.getRule()==null){","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/MyCATApache/Mycat-Server/blob/65f8d8beb752f935752f2a0eec0ab017facab9ef/src/main/java/io/mycat/util/dataMigrator/ConfigComparer.java#L151-L187","documentation":"loadMigratorTable rejects non-sharding tables: if either the old or the new TableConfig is null (the table is not a sharding table in one of the configs), a ConfigException is thrown instructing the user to fix tablesFile.properties. Global tables are skipped with a warning instead, but entirely missing table configs are fatal.","triggerScenarios":"tablesFile.properties lists a table that exists in one configuration but is null/absent in the other (non-sharding table, or configured only in old or only in new schema.xml).","commonSituations":"Listing a normal (non-sharded) MySQL table in tablesFile.properties; a table defined with dataNode directly in only one config; typo so the table lookup fails in the new config.","solutions":["Remove non-sharding tables from tablesFile.properties — only sharding tables can be migrated.","Ensure the table is defined as a sharding <table> with a rule in BOTH old and new schema.xml.","Fix the table name spelling in tablesFile.properties.","Re-run after confirming both configs resolve the table to non-null TableConfig objects."],"exampleFix":"// before: tablesFile.properties\nmydb:order_main,dict_table  # dict_table is not sharded\n// after\nmydb:order_main","handlingStrategy":"validation","validationCode":"for (String table : tables) {\n    TableConfig oldT = oldSchema.getTables().get(table);\n    TableConfig newT = newSchema.getTables().get(table);\n    if (oldT == null || newT == null)\n        throw new IllegalArgumentException(\"non-sharding/missing table: \" + schema + \":\" + table);\n    if (oldT.isGlobalTable() || newT.isGlobalTable()) continue; // skipped anyway\n}","typeGuard":null,"tryCatchPattern":"try {\n    comparer.compare();\n} catch (ConfigException e) {\n    if (e.getMessage().contains(\"is sharding table\")) {\n        // remove non-sharding tables from tablesFile.properties\n    }\n    throw e;\n}","preventionTips":["Only list tables that have a <rule> in both schema.xml versions","Filter out non-sharding and global tables when generating tablesFile.properties","Double-check table name spelling against schema.xml"],"tags":["java","configuration","data-migration","sharding"],"backgroundTag":"invalid-config-value","analyzedSha":"65f8d8beb752f935752f2a0eec0ab017facab9ef","analyzedAt":"2026-09-11T00:12:21.696Z","contentChangedAt":"2026-09-11T00:12:21.696Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}