{"record":{"id":"a7d0423e6bde8cbd","repo":"apache/cassandra","slug":"failuremessage","errorCode":null,"errorMessage":"failureMessage","messagePattern":"failureMessage","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/security/AbstractCryptoProvider.java","lineNumber":177,"sourceCode":"        }\n\n        if (failureMessage != null)\n        {\n            // To be sure there is not any leftover, proactively remove this provider in case of any failure.\n            // This method returns silently if the provider is not installed or if name is null.\n            try\n            {\n                uninstall();\n            }\n            catch (Throwable throwable)\n            {\n                logger.warn(\"Uninstallation of {} failed\", getProviderName(), throwable);\n            }\n\n            if (failOnMissingProvider)\n                throw new ConfigurationException(failureMessage, t);\n            else\n                logger.warn(failureMessage);\n        }\n    }\n\n    /**\n     * Uninstalls this crypto provider of name {@link #getProviderName()}\n     *\n     * @see Security#removeProvider(String)\n     */\n    public void uninstall()\n    {\n        Security.removeProvider(getProviderName());\n    }\n\n    private int getProviderPosition(String providerName)\n    {\n        Provider[] providers = Security.getProviders();\n\n        for (int i = 0; i < providers.length; i++)","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/security/AbstractCryptoProvider.java#L159-L195","documentation":"The failure path of AbstractCryptoProvider.install(): after a failed provider installation (and attempted cleanup), Cassandra throws ConfigurationException with a pre-built failureMessage when failOnMissingProvider is true, or logs it as a warning otherwise. The developer sees this message when the configured crypto provider could not be installed and strict failure mode is enabled.","triggerScenarios":"install() catches a Throwable t while installing the provider; failOnMissingProvider=true causes 'throw new ConfigurationException(failureMessage, t)', aborting node startup or the calling test.","commonSituations":"Provider jar not on the classpath; provider native library missing (e.g. OpenSSL lib unavailable); typo'd provider class/name in cassandra.yaml; JRE lacks support for the requested provider.","solutions":["Read the chained cause (t) for the real installation failure (missing class, native lib, etc.).","Add the provider dependency jar/lib to the classpath or install the native library.","Correct the crypto_provider class_name/parameters in cassandra.yaml.","Set failOnMissingProvider=false to fall back to the JDK default provider if strict installation is not required."],"exampleFix":"// before\ncrypto_provider:\n  - class_name: org.apache.cassandra.security.AmazonCorrettoCryptoProvider\n// after: either install the ACCP jar or switch to default\n# crypto_provider removed (falls back to JDK provider)","handlingStrategy":"try-catch","validationCode":"// pre-flight: confirm provider class is loadable\ntry { Class.forName(\"com.amazon.corretto.crypto.provider.AmazonCorrettoCryptoProvider\"); }\ncatch (ClassNotFoundException e) { throw new RuntimeException(\"Add provider jar to classpath\"); }","typeGuard":null,"tryCatchPattern":"try { cryptoProvider.install(); }\ncatch (ConfigurationException e) {\n    logger.error(\"crypto provider install failed: {}\", e.getMessage(), e.getCause());\n    // fall back to JDK default provider or abort startup\n}","preventionTips":["Ship the provider jar and native libs with the Cassandra distribution.","Run a startup pre-flight that loads the provider class before cassandra.yaml is parsed strictly.","Keep failOnMissingProvider=true in production to fail fast rather than silently falling back."],"tags":["security","crypto-provider","configuration","startup"],"backgroundTag":"invalid-config-value","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"}