{"record":{"id":"6bb109ecdb9e34bd","repo":"apache/cassandra","slug":"failed-to-instantiate-sstable-format-s","errorCode":null,"errorMessage":"Failed to instantiate sstable format '%s'","messagePattern":"Failed to instantiate sstable format '(.+?)'","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":2010,"sourceCode":"    }\n\n    private static void applySSTableFormats(Iterable<SSTableFormat.Factory> factories, Config.SSTableConfig sstableFormatsConfig)\n    {\n        if (sstableFormats != null)\n            return;\n\n        validateSSTableFormatFactories(factories);\n        ImmutableMap<String, Supplier<SSTableFormat<?, ?>>> providers = validateAndMatchSSTableFormatOptions(factories, sstableFormatsConfig.format);\n\n        ImmutableMap.Builder<String, SSTableFormat<?, ?>> sstableFormatsBuilder = ImmutableMap.builder();\n        providers.forEach((name, provider) -> {\n            try\n            {\n                sstableFormatsBuilder.put(name, provider.get());\n            }\n            catch (RuntimeException | Error ex)\n            {\n                throw new ConfigurationException(String.format(\"Failed to instantiate sstable format '%s'\", name), ex);\n            }\n        });\n        sstableFormats = sstableFormatsBuilder.build();\n\n        selectedSSTableFormat = getAndValidateWriteFormat(sstableFormats, sstableFormatsConfig.selected_format);\n\n        sstableFormats.values().forEach(SSTableFormat::allComponents); // make sure to reach all supported components for a type so that we know all of them are registered\n        logger.info(\"Supported sstable formats are: {}\", sstableFormats.values().stream().map(f -> f.name() + \" -> \" + f.getClass().getName() + \" with singleton components: \" + f.allComponents()).collect(Collectors.joining(\", \")));\n    }\n\n    /**\n     * Computes the sum of the 2 specified positive values returning {@code Long.MAX_VALUE} if the sum overflow.\n     *\n     * @param left  the left operand\n     * @param right the right operand\n     * @return the sum of the 2 specified positive values of {@code Long.MAX_VALUE} if the sum overflow.\n     */\n    private static long saturatedSum(long left, long right)","sourceCodeStart":1992,"sourceCodeEnd":2028,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1992-L2028","documentation":"After validating format options, DatabaseDescriptor invokes each registered format Supplier to instantiate the SSTableFormat; any RuntimeException or Error thrown by the supplier is wrapped in this ConfigurationException naming the format. This converts provider-construction failures (bad option values, missing classes, internal errors) into a single startup-time config error.","triggerScenarios":"A registered format's Supplier.get() throws while applying its configured options, e.g. invalid sstable_formats.options value for the format, NoClassDefFoundError from a missing dependency jar, or an assertion/internal error inside the format's constructor.","commonSituations":"Misconfigured format-specific options in cassandra.yaml; incomplete deployment missing a format's dependency classes; incompatible format implementation against the running Cassandra version throwing during init.","solutions":["Read the wrapped cause (ex) in the stack trace to see why the format's constructor failed","Fix or remove the offending sstable_formats.options entry for that format in cassandra.yaml","Restore missing dependency jars or use a format version compatible with your Cassandra version"],"exampleFix":"// before (cassandra.yaml)\nsstable_formats:\n  options:\n    bti:\n      target_segment_size: \"not-a-number\"\n// after\nsstable_formats:\n  options:\n    bti:\n      target_segment_size: 64MiB","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { DatabaseDescriptor.daemonInitialization(); }\ncatch (ConfigurationException e) {\n    log.error(\"SSTable format init failed: {}\", e.getMessage(), e.getCause()); // inspect cause\n}","preventionTips":["Always read the wrapped cause to find the real failure","Unit-test custom format Suppliers against your production cassandra.yaml options","Keep third-party format jars and their dependencies complete and version-matched"],"tags":["configuration","sstable","startup"],"backgroundTag":"module-init-failed","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"}