{"record":{"id":"6a071834b8608bb0","repo":"apache/cassandra","slug":"unable-to-serialize-minimum-client-driver-versions","errorCode":null,"errorMessage":"Unable to serialize minimum_client_driver_versions_warned configuration: ","messagePattern":"Unable to serialize minimum_client_driver_versions_warned configuration: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/guardrails/Guardrails.java","lineNumber":1930,"sourceCode":"        DEFAULT_CONFIG.setUnsetTrainingMinFrequencyEnabled(value);\n    }\n\n    @Override\n    public boolean getUnsetTrainingMinFrequencyEnabled()\n    {\n        return DEFAULT_CONFIG.getUnsetTrainingMinFrequencyEnabled();\n    }\n\n    @Override\n    public String getMinimumClientDriverVersionsWarned()\n    {\n        try\n        {\n            return JsonUtils.JSON_OBJECT_MAPPER.writeValueAsString(DEFAULT_CONFIG.getMinimumClientDriverVersionsWarned());\n        }\n        catch (Throwable t)\n        {\n            throw new RuntimeException(\"Unable to serialize minimum_client_driver_versions_warned configuration: \" + t.getMessage());\n        }\n    }\n\n    @Override\n    public String getMinimumClientDriverVersionsDisallowed()\n    {\n        try\n        {\n            return JsonUtils.JSON_OBJECT_MAPPER.writeValueAsString(DEFAULT_CONFIG.getMinimumClientDriverVersionsDisallowed());\n        }\n        catch (Throwable t)\n        {\n            throw new RuntimeException(\"Unable to serialize minimum_client_driver_versions_disallowed configuration: \" + t.getMessage());\n        }\n    }\n\n    @Override\n    public void setMinimumClientDriverVersionsWarned(String value)","sourceCodeStart":1912,"sourceCodeEnd":1948,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/guardrails/Guardrails.java#L1912-L1948","documentation":"Serializing DEFAULT_CONFIG.getMinimumClientDriverVersionsWarned() to JSON failed; the RuntimeException message appends the original Throwable's getMessage(), unlike the password/role policy variants. This indicates an internal problem converting the default minimum-client-driver-versions map to JSON.","triggerScenarios":"Calling getMinimumClientDriverVersionsWarned() when Jackson cannot serialize the default versions structure — usually an internal/classpath anomaly rather than user input, since the value is a built-in default.","commonSituations":"A shaded-jar or dependency conflict replacing JSON_OBJECT_MAPPER with an incompatible Jackson; a build with a corrupted DEFAULT_CONFIG; custom patches altering the versions map type.","solutions":["Check the appended cause text ('...: ' + t.getMessage()) in the exception or logs and fix the underlying Jackson issue","Verify jackson-databind/core/annotations versions match what Cassandra expects (no conflicting jars on the classpath)","Rebuild/redeploy from an unmodified Cassandra distribution to restore a sane DEFAULT_CONFIG","Report upstream if it reproduces on a clean install, since the value is a built-in default"],"exampleFix":"// before\nclasspath contains jackson-databind 2.9 (incompatible)\n// after\nRemove the stale jar; use the Jackson versions shipped with the Cassandra distribution (lib/)","handlingStrategy":"try-catch","validationCode":"// Sanity check on a clean node before relying on the getter\nString json = guardrails.getMinimumClientDriverVersionsWarned();\nif (json == null || !json.startsWith(\"{\")) logger.error(\"Unexpected serialization output\");","typeGuard":null,"tryCatchPattern":"try {\n    String json = guardrails.getMinimumClientDriverVersionsWarned();\n} catch (RuntimeException e) {\n    logger.error(\"Failed to serialize minimum_client_driver_versions_warned: {}\", e.getMessage());\n    // likely a Jackson classpath issue; fix deps and restart\n}","preventionTips":["Ship only the Jackson versions bundled with the Cassandra distribution","Avoid fat jars that shade conflicting Jackson versions into the server classpath","Since this reads a built-in default, treat reproducible failures as a build/deploy bug and report upstream"],"tags":["guardrails","json-serialization","client-driver-versions"],"backgroundTag":"json-serialization-failed","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}