apache/cassandra · error · ConfigurationException
Unable to create instance of IAuditLogger.
Error message
Unable to create instance of IAuditLogger.
What it means
newAuditLogger instantiates the configured IAuditLogger implementation reflectively from its class name plus a Map of parameters. Any failure to load, access, or construct the class is wrapped in a ConfigurationException. This runs at audit-logging startup, so it blocks node start when audit logging is enabled with a bad class.
Solutions
- Fix logger_class to the correct fully-qualified class name (default: org.apache.cassandra.audit.AuditLogger)
- Ensure the class's jar is on the classpath (lib/) on every node
- Verify the class has a public constructor accepting Map<String,String>
- Check logger constructor/parameters for errors in the server log (root cause is chained as the exception cause)
Example fix
// before (cassandra.yaml) audit_logging_options: logger_class: com.mycompany.MyAuditLoggr // after audit_logging_options: logger_class: com.mycompany.MyAuditLogger
Defensive patterns
Strategy: validation
Validate before calling
String cls = auditOptions.get("logger_class");
try { Class.forName(cls).getConstructor(Map.class); }
catch (ClassNotFoundException | NoSuchMethodException e) { throw new IllegalArgumentException("Bad IAuditLogger class: " + cls, e); } Type guard
boolean isValidAuditLogger(String cn) {
try { return IAuditLogger.class.isAssignableFrom(Class.forName(cn)); }
catch (Throwable t) { return false; }
} Try / catch
try {
AuditLogManager.instance.initialize();
} catch (ConfigurationException e) {
logger.error("Audit logger setup failed", e); // falls back / aborts start with clear cause
} Prevention
- Keep the default AuditLogger class unless a custom one is truly needed
- Ship custom logger jars to lib/ on every node in the ring
- Test cassandra.yaml changes in a staging node first
- Keep a public (Map<String,String>) constructor on custom loggers
When it happens
Trigger: audit_logging_options with a logger_class that does not exist, lacks a (Map) constructor, has wrong visibility, or whose constructor throws; called from AuditLogManager when initializing audit logging.
Common situations: Typo in the fully-qualified class name; custom audit logger jar missing from lib/; constructor signature changed after an upgrade; custom logger throws in its constructor due to bad parameters.
Related errors
- Unable to find class
- Could not create memtable factory for class
- create method not found
- Invalid auth provider class:
- Invalid parameterized class <providerClass.getName()>: must…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/56ee803978df080e.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/utils/FBUtilities.java:698
return new LocalPartitioner(comparator.get());
}
return FBUtilities.instanceOrConstruct(partitionerClassName, "partitioner", IPartitioner.class);
}
public static IAuditLogger newAuditLogger(String className, Map<String, String> parameters) throws ConfigurationException
{
if (!className.contains("."))
className = "org.apache.cassandra.audit." + className;
try
{
Class<? extends IAuditLogger> auditLoggerClass =
FBUtilities.classForNameWithoutInitialization(className, "Audit logger", IAuditLogger.class);
return auditLoggerClass.getConstructor(Map.class).newInstance(parameters);
}
catch (Exception ex)
{
throw new ConfigurationException("Unable to create instance of IAuditLogger.", ex);
}
}
public static ISslContextFactory newSslContextFactory(String className, Map<String,Object> parameters) throws ConfigurationException
{
if (!className.contains("."))
className = "org.apache.cassandra.security." + className;
try
{
Class<? extends ISslContextFactory> sslContextFactoryClass =
FBUtilities.classForNameWithoutInitialization(className, "ISslContextFactory", ISslContextFactory.class);
return sslContextFactoryClass.getConstructor(Map.class).newInstance(parameters);
}
catch (Exception ex)
{
// Surface the underlying load failure (e.g. ClassNotFoundException) as the direct cause rather than the
// intermediate ConfigurationException that reports it.View on GitHub (pinned to 88fd0f6a0e)