{"record":{"id":"65556b70c7b8054a","repo":"apache/cassandra","slug":"table-id-not-specified","errorCode":null,"errorMessage":"Table id not specified.","messagePattern":"Table id not specified\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/compression/CompressionDictionaryDetailsTabularData.java","lineNumber":292,"sourceCode":"         *     <li>keyspace, table and table id are not null</li>\n         *     <li>dict id is lower than 0</li>\n         *     <li>dict is not null nor empty</li>\n         *     <li>dict length is less than or equal to 1MiB</li>\n         *     <li>kind is not null and there is such {@link org.apache.cassandra.db.compression.CompressionDictionary.Kind}</li>\n         *     <li>dictLength is bigger than 0</li>\n         *     <li>dictLength has to be equal to dict's length</li>\n         *     <li>dictChecksum has to be equal to checksum computed as part of this method</li>\n         *     <li>creation date is not null</li>\n         * </ul>\n         */\n        private void validate()\n        {\n            if (keyspace == null)\n                throw new IllegalArgumentException(\"Keyspace not specified.\");\n            if (table == null)\n                throw new IllegalArgumentException(\"Table not specified.\");\n            if (tableId == null)\n                throw new IllegalArgumentException(\"Table id not specified.\");\n            if (dictId <= 0)\n                throw new IllegalArgumentException(\"Provided dictionary id must be positive but it is '\" + dictId + \"'.\");\n            if (dict == null || dict.length == 0)\n                throw new IllegalArgumentException(\"Provided dictionary byte array is null or empty.\");\n            if (kind == null)\n                throw new IllegalArgumentException(\"Provided kind is null.\");\n\n            CompressionDictionary.Kind dictionaryKind;\n\n            try\n            {\n                dictionaryKind = CompressionDictionary.Kind.valueOf(kind);\n            }\n            catch (IllegalArgumentException ex)\n            {\n                throw new IllegalArgumentException(\"There is no such dictionary kind like '\" + kind + \"'. Available kinds: \" + Arrays.asList(CompressionDictionary.Kind.values()));\n            }\n","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/compression/CompressionDictionaryDetailsTabularData.java#L274-L310","documentation":"validate() requires a non-null tableId (the UUID identifying the table) in addition to the table name. The tableId is what the dictionary is actually keyed on internally, so a missing UUID makes the descriptor ambiguous and is rejected.","triggerScenarios":"Creating a CompressionDictionaryDataObject with tableId == null — e.g. the caller knows the table name but never resolved its UUID (TableId) before importing the dictionary.","commonSituations":"Import scripts that use only 'ks.tbl' names; JMX clients passing partial descriptor data; UUID lost when round-tripping through text formats.","solutions":["Resolve the TableId from the keyspace/table name (e.g. via SchemaManager/schema metadata) and set it on the data object","If constructing from user input, parse the UUID explicitly and fail fast with a clearer message","Check the CompositeData source includes the TABLE_ID item"],"exampleFix":"// before\nTableId tableId = null; // never resolved\nnew CompressionDictionaryDataObject(\"ks\", \"tbl\", tableId, ...);\n// after\nTableId tableId = Schema.instance.getTableId(\"ks\", \"tbl\");\nnew CompressionDictionaryDataObject(\"ks\", \"tbl\", tableId, ...);","handlingStrategy":"validation","validationCode":"if (obj.tableId == null) throw new IllegalArgumentException(\"tableId must be resolved (TableId) before creating CompressionDictionaryDataObject\");","typeGuard":"boolean hasTableId(CompressionDictionaryDataObject o) { return o.tableId != null; }","tryCatchPattern":"try { tabularData.fromDataObject(obj); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"Table id not specified\")) { /* resolve TableId via Schema and rebuild */ } else throw e; }","preventionTips":["Resolve TableId via the schema API immediately before import, never pass a possibly-null UUID","Log the resolved tableId when building descriptors to catch nulls early","Prefer constructing from an existing TableMetadata which always carries its TableId"],"tags":["jmx","validation","uuid"],"backgroundTag":"missing-required-argument","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"}