{"record":{"id":"b96471286398c8d3","repo":"aeron-io/aeron","slug":"clusterbackup-context-sourcetype-sourcetype-is-not-valid","errorCode":null,"errorMessage":"ClusterBackup.Context.sourceType=${sourceType} is not valid. Must be one of: ${Arrays.toString(SourceType.values())}","messagePattern":"ClusterBackup\\.Context\\.sourceType=(.+?) is not valid\\. Must be one of: (.+?)","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackup.java","lineNumber":906,"sourceCode":"            }\n\n            if (null == extendedTerminationHook)\n            {\n                extendedTerminationHook = cause -> {};\n            }\n\n            if (null == credentialsSupplier)\n            {\n                credentialsSupplier = new NullCredentialsSupplier();\n            }\n\n            try\n            {\n                SourceType.valueOf(sourceType);\n            }\n            catch (final IllegalArgumentException ex)\n            {\n                throw new ConfigurationException(\n                    \"ClusterBackup.Context.sourceType=\" + sourceType + \" is not valid. Must be one of: \" +\n                    Arrays.toString(SourceType.values()));\n            }\n\n            concludeMarkFile();\n        }\n\n        /**\n         * Has the context had the {@link #conclude()} method called.\n         *\n         * @return true of the {@link #conclude()} method has been called.\n         */\n        public boolean isConcluded()\n        {\n            return isConcluded;\n        }\n\n        /**","sourceCodeStart":888,"sourceCodeEnd":924,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackup.java#L888-L924","documentation":"ClusterBackup.Context supports a sourceType property (from system properties or explicit configuration) that must name a valid SourceType enum constant. ConfigurationException is thrown during conclude() when SourceType.valueOf fails, i.e. the value is not one of the allowed enum values, and the message lists valid values.","triggerScenarios":"Setting the ClusterBackup sourceType property to an unknown string such as 'SNAPSHOT' or 'seed' instead of a valid SourceType constant (e.g. SEED, LIVE, SNAPSHOT depending on version).","commonSituations":"Typo in a properties file or system property; renaming/upgrade where SourceType constants changed between Aeron versions.","solutions":["Set sourceType to exactly one of the values printed in the message from Arrays.toString(SourceType.values()).","Check the SourceType enum in your Aeron version, as the allowed constants can change across releases.","Remove the property to use the default source type if unsure."],"exampleFix":"// before\n-Dio.aeron.cluster.backup.sourceType=SNAPSHOT\n// after\n-Dio.aeron.cluster.backup.sourceType=LIVE","handlingStrategy":"validation","validationCode":"String st = System.getProperty(ClusterBackup.Configuration.SOURCE_TYPE_PROP_NAME, \"\");\ntry { ClusterBackup.SourceType.valueOf(st); } catch (IllegalArgumentException e) { /* fix to a valid SourceType value */ }","typeGuard":null,"tryCatchPattern":"try { ClusterBackup.launch(ctx); } catch (ConfigurationException e) { log.error(\"Bad sourceType config: {}\", e.getMessage()); }","preventionTips":["Validate sourceType property against SourceType.values() at startup","Recheck enum constants after Aeron version upgrades"],"tags":["aeron","configuration","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}