{"record":{"id":"590779d873240fc5","repo":"kestra-io/kestra","slug":"failed-to-validate-configuration-for-s-s-erro","errorCode":null,"errorMessage":"Failed to validate configuration for %s '%s'. Error: %s","messagePattern":"Failed to validate configuration for (.+?) '(.+?)'\\. Error: (.+?)","errorType":"exception","errorClass":"KestraRuntimeException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/plugins/AbstractPluginInterfaceFactory.java","lineNumber":122,"sourceCode":"\n        // Plugins are handled as any serializable/deserialize plugins.\n        T plugin;\n        try {\n            // Make sure config is not null, otherwise deserialization result will be null too.\n            Map<String, Object> nonEmptyConfig = Optional.ofNullable(pluginConfiguration).orElse(Map.of());\n            plugin = (T) JacksonMapper.toMap(nonEmptyConfig, pluginClass);\n        } catch (Exception e) {\n            throw new KestraRuntimeException(\n                String.format(\"Failed to create %s '%s'. Error: %s\", configDisplayName(), pluginId, e.getMessage())\n            );\n        }\n\n        // Validate configuration.\n        Set<ConstraintViolation<T>> violations;\n        try {\n            violations = validator.validate(plugin);\n        } catch (ConstraintViolationException e) {\n            throw new KestraRuntimeException(\n                String.format(\"Failed to validate configuration for %s '%s'. Error: %s\", configDisplayName(), pluginId, e.getMessage())\n            );\n        }\n        if (!violations.isEmpty()) {\n            ConstraintViolationException e = new ConstraintViolationException(violations);\n            throw new KestraRuntimeException(\n                String.format(\"Invalid configuration for %s '%s'. Error: '%s'\", configDisplayName(), pluginId, e.getMessage()), e\n            );\n        }\n\n        return plugin;\n    }\n\n    /**\n     * Builds the exception thrown when no plugin matches the requested id. Overridable so subclasses\n     * can enrich the message (e.g. EE surfacing a license-gated type as \"installed but not enabled\").\n     *\n     * @param pluginId the requested (unmatched) plugin id.","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/core/src/main/java/io/kestra/core/plugins/AbstractPluginInterfaceFactory.java#L104-L140","documentation":"Thrown by AbstractPluginInterfaceFactory.resolve() when the Bean Validation (jakarta.validation) validator throws a ConstraintViolationException during plugin validation — distinct from error 38 (deserialization) and the subsequent 'Invalid configuration' path. This fires when the validator itself errors (not when it returns violations), typically because a custom validator on the plugin class threw an exception. The underlying message is embedded. KestraRuntimeException.","triggerScenarios":"A plugin class has a custom @ConstraintValidator whose isValid() throws; a validator depends on a resource that is unavailable; a validation annotation is misconfigured on the plugin class.","commonSituations":"Plugin author shipped a buggy custom validator; a validator relies on a context that is null at resolution time; version skew between the plugin and its validation annotations.","solutions":["Inspect the embedded error message to locate the failing validator.","If it is a plugin bug, report it to the plugin maintainer with the stack trace.","Temporarily simplify the config to bypass the failing validator and isolate the cause.","Ensure the plugin version matches the Kestra version's validation contract."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    factory.resolve(identifier, config);\n} catch (KestraRuntimeException e) {\n    if (e.getMessage().startsWith(\"Failed to validate configuration\")) {\n        log.error(\"Plugin validation threw: {}. Likely a custom validator bug.\", e.getMessage());\n    }\n    throw e;\n}","preventionTips":["Ensure custom plugin validators do not throw from isValid().","Report validator crashes to the plugin maintainer with a full stack trace."],"tags":["plugin","configuration","validation","bean-validation"],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}