{"record":{"id":"01ed9eef0bafb043","repo":"apache/cassandra","slug":"memtable-class-classname-does-not-accept-any-fu","errorCode":null,"errorMessage":"Memtable class ${className} does not accept any futher parameters, but ${parametersCopy} were given.","messagePattern":"Memtable class (.+?) does not accept any futher parameters, but (.+?) were given\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/schema/MemtableParams.java","lineNumber":253,"sourceCode":"            try\n            {\n                Method factoryMethod = clazz.getDeclaredMethod(\"factory\", Map.class);\n                if (!Memtable.Factory.class.isAssignableFrom(factoryMethod.getReturnType()))\n                    throw new ClassCastException(\"Memtable factory method on \" + className +\n                                                 \" must return \" + Memtable.Factory.class.getName());\n                factory = (Memtable.Factory) factoryMethod.invoke(null, parametersCopy);\n            }\n            catch (NoSuchMethodException e)\n            {\n                // continue with FACTORY field\n                Field factoryField = clazz.getDeclaredField(\"FACTORY\");\n                if (!Memtable.Factory.class.isAssignableFrom(factoryField.getType()))\n                    throw new ClassCastException(\"Memtable FACTORY field on \" + className +\n                                                 \" must be of type \" + Memtable.Factory.class.getName());\n                factory = (Memtable.Factory) factoryField.get(null);\n            }\n            if (!parametersCopy.isEmpty())\n                throw new ConfigurationException(\"Memtable class \" + className + \" does not accept any futher parameters, but \" +\n                                                 parametersCopy + \" were given.\");\n            return factory;\n        }\n        catch (NoSuchFieldException | ClassNotFoundException | IllegalAccessException | InvocationTargetException | ClassCastException e)\n        {\n            if (e.getCause() instanceof ConfigurationException)\n                throw (ConfigurationException) e.getCause();\n            throw new ConfigurationException(\"Could not create memtable factory for class \" + options, e);\n        }\n    }\n}\n","sourceCodeStart":235,"sourceCodeEnd":265,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/schema/MemtableParams.java#L235-L265","documentation":"Thrown from MemtableParams.getMemtableFactory after reflective loading of a custom memtable class: the resolved Memtable.Factory does not accept further parameters, but the configuration entry still has leftover option keys after consuming recognized ones. Cassandra treats unconsumed parameters as invalid configuration and throws a ConfigurationException (the message contains a pre-existing typo 'futher').","triggerScenarios":"memtable_configurations entry with class_name pointing at a memtable whose FACTORY field rejects parameters (e.g. SkipListMemtable which takes none) while the entry supplies options like {'class_name':'SkipListMemtable','some_param':'1'}; after factory extraction, parametersCopy is non-empty.","commonSituations":"Passing options like 'shards' to a memtable class that doesn't support them, copy-pasting options between SkipListMemtable and configurable memtable implementations, misspelling a supported parameter name so it isn't consumed.","solutions":["Remove unsupported parameters from the entry in cassandra.yaml, leaving only class_name (plus params the memtable actually supports).","Switch class_name to a memtable implementation that supports the parameters you need.","Fix parameter key spelling so the factory recognizes and consumes them.","Check the memtable class's accepted parameter list in its documentation/source."],"exampleFix":"# before (cassandra.yaml)\nmemtable_configurations:\n  plain:\n    class_name: SkipListMemtable\n    shards: 4\n# after\nmemtable_configurations:\n  plain:\n    class_name: SkipListMemtable","handlingStrategy":"validation","validationCode":"// pre-check: only pass parameters documented by the target memtable class\nMap<String,String> params = new HashMap<>(options); params.remove(\"class_name\");\nif (!targetMemtableAcceptsParams(className) && !params.isEmpty()) throw new IllegalStateException(className + \" accepts no parameters; remove \" + params.keySet());","typeGuard":null,"tryCatchPattern":"try { parseMemtableConfig(entry); } catch (ConfigurationException e) { if (e.getMessage().contains(\"does not accept any\")) stripUnknownParamsAndRetry(); else throw e; }","preventionTips":["Only supply parameters explicitly supported by the memtable class's factory.","Read the target memtable class's source/docs for its accepted parameter names before configuring.","Do not copy OPTIONS blocks between different memtable implementations.","Watch for typos: an unconsumed key surfaces as this error, not as 'unknown option'."],"tags":["cassandra","configuration","memtable","reflection"],"backgroundTag":"unsupported-config-value","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"}