{"record":{"id":"b1caa1a6875253f6","repo":"flowable/flowable-engine","slug":"there-is-no-engine-configuration-for-scope-engin-b1caa1","errorCode":null,"errorMessage":"There is no engine configuration for scope ${engineScopeType}","messagePattern":"There is no engine configuration for scope (.+?)","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaOperationsEngineDropDbCmd.java","lineNumber":42,"sourceCode":"\n/**\n * @author Filip Hrisafov\n */\npublic class SchemaOperationsEngineDropDbCmd implements Command<Void> {\n\n    protected final String engineScopeType;\n\n    public SchemaOperationsEngineDropDbCmd(String engineScopeType) {\n        this.engineScopeType = engineScopeType;\n    }\n\n    @Override\n    public Void execute(CommandContext commandContext) {\n\n        AbstractEngineConfiguration engineConfiguration = commandContext.getEngineConfigurations()\n                .get(engineScopeType);\n        if (engineConfiguration == null) {\n            throw new FlowableIllegalArgumentException(\"There is no engine configuration for scope \" + engineScopeType);\n        }\n\n        List<SchemaManager> schemaManagers = new ArrayList<>();\n        schemaManagers.add(engineConfiguration.getCommonSchemaManager());\n        schemaManagers.add(engineConfiguration.getSchemaManager());\n\n        Map<String, SchemaManager> additionalSchemaManagers = engineConfiguration.getAdditionalSchemaManagers();\n\n        if (additionalSchemaManagers != null) {\n            schemaManagers.addAll(additionalSchemaManagers.values());\n        }\n\n        // The drop is executed in the reverse order\n        ListIterator<SchemaManager> listIterator = schemaManagers.listIterator(schemaManagers.size());\n        while (listIterator.hasPrevious()) {\n            SchemaManager schemaManager = listIterator.previous();\n            try {\n                schemaManager.schemaDrop();","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/SchemaOperationsEngineDropDbCmd.java#L24-L60","documentation":"Same lookup failure as the build command but in SchemaOperationsEngineDropDbCmd.execute: dropping the DB schema for an engine scope whose AbstractEngineConfiguration is not registered in CommandContext.getEngineConfigurations(). Flowable cannot find the schema managers to perform the drop.","triggerScenarios":"Running SchemaOperationsEngineDropDbCmd with an engineScopeType that has no registered configuration — e.g. invoking schema drop during shutdown/cleanup for an engine that was never configured, or a misnamed scope constant.","commonSituations":"Custom teardown code dropping schemas for all known scope types when only some engines are installed; test cleanup calling drop for 'cmmn'/'dmn' in a process-only setup; typos in scope type constants.","solutions":["Only drop schemas for engine configurations actually registered; guard the command by checking engineConfigurations.containsKey(scope).","Correct the engineScopeType constant to the registered key.","Initialize/register the engine configuration before attempting the drop.","Rely on engine-provided close/destroy lifecycle methods rather than manual drop commands."],"exampleFix":"// before\nexecutor.execute(new SchemaOperationsEngineDropDbCmd(\"dmn\")); // dmn not installed\n// after\nif (engineConfigurations.containsKey(\"dmn\")) {\n  executor.execute(new SchemaOperationsEngineDropDbCmd(\"dmn\"));\n}","handlingStrategy":"validation","validationCode":"if (engineConfigurations.containsKey(scope)) { executor.execute(new SchemaOperationsEngineDropDbCmd(scope)); }","typeGuard":null,"tryCatchPattern":"catch (FlowableIllegalArgumentException e) { if (e.getMessage().startsWith(\"There is no engine configuration for scope\")) { log.warn(\"skipping drop for uninstalled scope\"); return; } throw e; }","preventionTips":["Enumerate scopes from engineConfigurations.keySet() rather than hardcoding.","Skip drop for engines never installed.","Delegate teardown to engine lifecycle close methods."],"tags":["configuration","schema","flowable","teardown"],"backgroundTag":"missing-config-key","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}