{"record":{"id":"7e2c110f78111e79","repo":"flowable/flowable-engine","slug":"could-not-find-an-implementation-of-the-org-flowab","errorCode":null,"errorMessage":"Could not find an implementation of the org.flowable.cdi.spi.ProcessEngineLookup service returning a non-null processEngine. Giving up.","messagePattern":"Could not find an implementation of the org\\.flowable\\.cdi\\.spi\\.ProcessEngineLookup service returning a non-null processEngine\\. Giving up\\.","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"critical","filePath":"modules/flowable-cdi/src/main/java/org/flowable/cdi/impl/FlowableExtension.java","lineNumber":105,"sourceCode":"                return (-1) * ((Integer) o1.getPrecedence()).compareTo(o2.getPrecedence());\n            }\n        });\n\n        ProcessEngine processEngine = null;\n\n        for (ProcessEngineLookup processEngineLookup : discoveredLookups) {\n            processEngine = processEngineLookup.getProcessEngine();\n            if (processEngine != null) {\n                this.processEngineLookup = processEngineLookup;\n                LOGGER.debug(\"ProcessEngineLookup service {} returned process engine.\", processEngineLookup.getClass());\n                break;\n            } else {\n                LOGGER.debug(\"ProcessEngineLookup service {} returned 'null' value.\", processEngineLookup.getClass());\n            }\n        }\n\n        if (processEngineLookup == null) {\n            throw new FlowableException(\"Could not find an implementation of the org.flowable.cdi.spi.ProcessEngineLookup service \" + \"returning a non-null processEngine. Giving up.\");\n        }\n\n        FlowableServices services = ProgrammaticBeanLookup.lookup(FlowableServices.class, beanManager);\n        services.setProcessEngine(processEngine);\n\n        return processEngine;\n    }\n\n    private void deployProcesses(ProcessEngine processEngine) {\n        new ProcessDeployer(processEngine).deployProcesses();\n    }\n\n    public void beforeShutdown(@Observes BeforeShutdown event) {\n        if (processEngineLookup != null) {\n            processEngineLookup.ungetProcessEngine();\n            processEngineLookup = null;\n        }\n        LOGGER.info(\"Shutting down flowable-cdi\");","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cdi/src/main/java/org/flowable/cdi/impl/FlowableExtension.java#L87-L123","documentation":"During CDI container startup, FlowableExtension.lookupProcessEngine() iterates ProcessEngineLookup service implementations (via META-INF/services) to obtain a ProcessEngine. If no lookup is found — or all return null — it throws FlowableException, aborting initialization. The CDI module cannot function without a process engine.","triggerScenarios":"Deploying an app using flowable-cdi without registering an org.flowable.cdi.spi.ProcessEngineLookup implementation in META-INF/services, or the registered lookup returns null from getProcessEngine().","commonSituations":"Missing META-INF/services/org.flowable.cdi.spi.ProcessEngineLookup file after a migration to the new ServiceLoader mechanism; the old DefaultProcessEngineLookup/LocalProcessEngineLookup removed from auto-registration; typo in the services file class name.","solutions":["Create META-INF/services/org.flowable.cdi.spi.ProcessEngineLookup containing your implementation class (e.g. LocalProcessEngineLookup).","Ensure the lookup's getProcessEngine() builds/returns a non-null engine (e.g. a StandaloneProcessEngineConfiguration with H2 datasource).","Verify the implementation class is on the classpath and instantiable (public no-arg constructor)."],"exampleFix":"// before\n(no services file) -> FlowableException at startup\n// after\n# file: META-INF/services/org.flowable.cdi.spi.ProcessEngineLookup\norg.myapp.MyProcessEngineLookup\n\npublic class MyProcessEngineLookup implements ProcessEngineLookup {\n  public ProcessEngine getProcessEngine() {\n    ProcessEngineConfiguration cfg = ProcessEngineConfiguration\n        .createStandaloneProcessEngineConfiguration()\n        .setDatabaseSchemaUpdate(\"true\");\n    return cfg.buildProcessEngine();\n  }\n}","handlingStrategy":"validation","validationCode":"URL res = getClass().getResource(\"/META-INF/services/org.flowable.cdi.spi.ProcessEngineLookup\");\nif (res == null) {\n  throw new IllegalStateException(\"Register a ProcessEngineLookup in META-INF/services\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  // deploy/start the CDI app\n} catch (FlowableException e) {\n  if (e.getMessage().contains(\"ProcessEngineLookup\")) {\n    // add/fix the services registration before continuing\n  }\n}","preventionTips":["Ship META-INF/services/org.flowable.cdi.spi.ProcessEngineLookup with the app","Ensure the lookup's getProcessEngine() never returns null","Verify the services file class name matches an existing classpath class","Re-check CDI wiring after flowable-cdi version migrations"],"tags":["flowable","cdi","configuration","service-loader","startup"],"backgroundTag":"missing-required-config","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"}