{"record":{"id":"780ba2a51b73143c","repo":"apache/cassandra","slug":"unknown-keyspace-table-s-s-780ba2","errorCode":null,"errorMessage":"Unknown keyspace/table %s.%s","messagePattern":"Unknown keyspace/table (.+?)\\.(.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/StandaloneSSTableUtil.java","lineNumber":59,"sourceCode":"    private static final String TYPE_OPTION  = \"type\";\n    private static final String OP_LOG_OPTION  = \"oplog\";\n    private static final String VERBOSE_OPTION  = \"verbose\";\n    private static final String DEBUG_OPTION  = \"debug\";\n    private static final String HELP_OPTION  = \"help\";\n    private static final String CLEANUP_OPTION = \"cleanup\";\n\n    public static void main(String args[])\n    {\n\n        Options options = Options.parseArgs(args);\n        try\n        {\n            // load keyspace descriptions.\n            Util.initDatabaseDescriptor();\n            ClusterMetadataService.initializeForTools(false);\n            TableMetadata metadata = Schema.instance.getTableMetadata(options.keyspaceName, options.cfName);\n            if (metadata == null)\n                throw new IllegalArgumentException(String.format(\"Unknown keyspace/table %s.%s\",\n                                                                 options.keyspaceName,\n                                                                 options.cfName));\n\n            OutputHandler handler = new OutputHandler.SystemOutput(options.verbose, options.debug);\n\n            if (options.cleanup)\n            {\n                handler.output(\"Cleaning up...\");\n                LifecycleTransaction.removeUnfinishedLeftovers(metadata);\n            }\n            else\n            {\n                handler.output(\"Listing files...\");\n                listFiles(options, metadata, handler);\n            }\n\n            System.exit(0);\n        }","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/StandaloneSSTableUtil.java#L41-L77","documentation":"StandaloneSSTableUtil.main resolves the target table via Schema.instance.getTableMetadata(keyspaceName, cfName) after initializing the database descriptor offline. If no table metadata exists for the given keyspace/table pair, it throws IllegalArgumentException, because the offline operation cannot proceed without a valid table definition.","triggerScenarios":"Running a standalone SSTable tool (e.g. upgradesstables/scrub variants) with a --keyspace/--table combination that does not exist in the schema (schema files loaded offline).","commonSituations":"Typo in keyspace or table name; case-sensitivity mistake (unquoted identifiers are lowercased in CQL); running the tool against the wrong data directory or without the schema being loadable; table dropped between snapshot and tool run.","solutions":["Verify the exact keyspace and table names (cqlsh: DESCRIBE keyspaces / DESCRIBE tables)","Remember names are case-sensitive when quoted; unquoted names are lowercased","Run the tool with the correct schema so TableMetadata can be resolved (correct data/config directories)","If the table was dropped, restore its schema before running offline tools"],"exampleFix":"// before\nStandaloneSSTableUtil --keyspace KS1 --table UserS\n// after\nStandaloneSSTableUtil --keyspace ks1 --table users","handlingStrategy":"validation","validationCode":"// Before invoking the tool:\nboolean exists = Schema.instance.getTableMetadata(ks, cf) != null;\nif (!exists) throw new IllegalArgumentException(\"Unknown keyspace/table \" + ks + \".\" + cf);","typeGuard":null,"tryCatchPattern":"try { StandaloneSSTableUtil.main(args); }\ncatch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"Unknown keyspace/table\")) {\n        // prompt for correct keyspace/table\n    } else throw e;\n}","preventionTips":["List keyspaces/tables with cqlsh before running offline tools","Quote identifiers in CQL so case matches what the tool expects","Copy the whole data directory including schema sources when running offline"],"tags":["cli","schema","offline-tools"],"backgroundTag":"resource-not-found","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}