{"record":{"id":"4bd9a160176e4f81","repo":"apache/cassandra","slug":"throw-new-ioexception-e-getmessage","errorCode":null,"errorMessage":"throw new IOException(e.getMessage())","messagePattern":"throw new IOException\\(e\\.getMessage\\(\\)\\)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/NodeProbe.java","lineNumber":2849,"sourceCode":"\n    private <T> T doWithCompressionDictionaryManagerMBean(Function<CompressionDictionaryManagerMBean, T> func,\n                                                          String keyspace, String table) throws IOException\n    {\n        try\n        {\n            return func.apply(getDictionaryManagerProxy(keyspace, table));\n        }\n        catch (Exception e)\n        {\n            if (e.getCause() instanceof InstanceNotFoundException)\n            {\n                String message = String.format(\"Table %s.%s does not exist or does not support dictionary compression\",\n                                               keyspace, table);\n                throw new IllegalArgumentException(message);\n            }\n            else\n            {\n                throw new IOException(e.getMessage());\n            }\n        }\n    }\n\n    /**\n     * Gets the compression dictionary training state for the specified table.\n     * Returns an atomic snapshot of training status, progress, and failure details.\n     *\n     * @param keyspace the keyspace name\n     * @param table the table name\n     * @return the current training state\n     * @throws IOException if there's an error accessing the MBean\n     */\n    public TrainingState getCompressionDictionaryTrainingState(String keyspace, String table) throws IOException\n    {\n        CompositeData compositeData = getDictionaryManagerProxy(keyspace, table).getTrainingState();\n        return TrainingState.fromCompositeData(compositeData);\n    }","sourceCodeStart":2831,"sourceCodeEnd":2867,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/NodeProbe.java#L2831-L2867","documentation":"In the same catch block as the dictionary-table lookup, any exception whose cause is NOT an InstanceNotFoundException is rethrown as an IOException containing only the exception's message. This covers all non-'table missing' failures during dictionary operations, such as IO errors, permission problems, or serialization failures on the server side.","triggerScenarios":"Calling a compression-dictionary nodetool command when the server-side manager throws anything other than 'MBean not found' — e.g. corrupt dictionary file on import, disk I/O failure, or a server-side Internal error.","commonSituations":"Importing a malformed or truncated dictionary file; insufficient disk space; node under failure; version mismatch producing message-only info (loses the stack trace).","solutions":["Check the node's system.log for the full server-side stack trace (the IOException only carries the message).","If importing, validate the dictionary file is complete and was produced by a compatible training run/version.","Retry after fixing disk/I-O issues on the node.","Upgrade to matching nodetool/node versions to rule out serialization mismatches."],"exampleFix":"// before\nnodetool importcompressiondict ks users /path/dict.dct   // truncated file\n// after\n# verify file integrity, then re-run\nmd5sum /path/dict.dct && nodetool importcompressiondict ks users /path/dict.dct","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { probe.importCompressionDictionary(ks, tbl, file); }\ncatch (IOException e) { log.error(\"Dictionary op failed server-side; check system.log for stack: {}\", e.getMessage()); }","preventionTips":["Verify dictionary files are complete and from a compatible version before import","Monitor node disk space and health before dictionary operations","Check system.log for the full trace since this wrapper drops the stack"],"tags":["jmx","nodetool","io","compression-dictionary"],"backgroundTag":"http-error-response","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"}