{"record":{"id":"81aff1435fc69722","repo":"flowable/flowable-engine","slug":"failed-to-determine-flowablehttpclient","errorCode":null,"errorMessage":"Failed to determine FlowableHttpClient","messagePattern":"Failed to determine FlowableHttpClient","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"critical","filePath":"modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/HttpClientConfig.java","lineNumber":251,"sourceCode":"\n    public FlowableHttpClient determineHttpClient() {\n        if (httpClient != null) {\n            return httpClient;\n        } else if (isApacheHttpComponentsPresent) {\n            // Backwards compatibility, if apache HTTP Components is present then it has priority\n            this.httpClient = new ApacheHttpComponentsFlowableHttpClient(this);\n            return this.httpClient;\n        } else if (isSpringWebClientPresent && isReactorHttpClientPresent) {\n            this.httpClient = new SpringWebClientFlowableHttpClient(this);\n            return httpClient;\n        } else if (isApacheHttpComponents5Present) {\n            ApacheHttpComponents5FlowableHttpClient httpClient = new ApacheHttpComponents5FlowableHttpClient(this);\n            this.httpClient = httpClient;\n            this.closeRunnable = httpClient::close;\n            return this.httpClient;\n        }\n        else {\n            throw new FlowableException(\"Failed to determine FlowableHttpClient\");\n        }\n    }\n\n    public boolean isDefaultParallelInSameTransaction() {\n        return defaultParallelInSameTransaction;\n    }\n\n    public void setDefaultParallelInSameTransaction(boolean defaultParallelInSameTransaction) {\n        this.defaultParallelInSameTransaction = defaultParallelInSameTransaction;\n    }\n\n    public void close() {\n        if (closeRunnable != null) {\n            closeRunnable.run();\n        }\n    }\n}\n","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/HttpClientConfig.java#L233-L269","documentation":"HttpClientConfig.determineHttpClient selects a concrete FlowableHttpClient implementation based on which HTTP client dependency is on the classpath (e.g. Apache HttpComponents 5, or older client). If none of the supported client classes can be instantiated/located, it throws FlowableException('Failed to determine FlowableHttpClient'). This normally means no supported HTTP client library was included in the application's dependencies.","triggerScenarios":"Creating/configuring an HttpClientConfig (via Spring config or the HTTP task engine) where the clientType is unset/unrecognized and no supported Apache HttpComponents client is on the classpath, so all branches fall through to the else throw.","commonSituations":"Missing flowable-http-client / httpcomponents5 dependency at runtime; excluding the transitive Apache dependency in a shade/assembly jar; mixing Flowable versions where the expected client class changed; using a custom clientType string not handled by the switch.","solutions":["Add the Apache HttpComponents 5 client dependency (flowable module that provides ApacheHttpComponents5FlowableHttpClient) to the classpath","Explicitly set the clientType (setHttpClientType) to a supported value matching the dependency you actually have","Check dependency conflicts: mvn dependency:tree and ensure the expected client JAR is packaged in the deployable artifact","Upgrade/downgrade Flowable modules so config and client implementations are from the same version"],"exampleFix":"// before\nHttpClientConfig cfg = new HttpClientConfig(); // no client type, no impl on classpath\n// after\nHttpClientConfig cfg = new HttpClientConfig();\ncfg.setHttpClientType(\"apache-httpcomponents5\"); // with matching dependency present\n","handlingStrategy":"fallback","validationCode":"try {\n    Class.forName(\"org.apache.hc.client5.http.classic.HttpClient\");\n} catch (ClassNotFoundException e) {\n    throw new IllegalStateException(\"Apache HttpComponents 5 client dependency missing from classpath\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    HttpClientConfig cfg = new HttpClientConfig();\n    HttpClient client = cfg.determineHttpClient();\n} catch (FlowableException e) {\n    if (e.getMessage().contains(\"Failed to determine FlowableHttpClient\")) {\n        throw new IllegalStateException(\"Add a supported HTTP client dependency (e.g. flowable httpcomponents5)\", e);\n    }\n    throw e;\n}","preventionTips":["Always include the matching Flowable HTTP client module in the deployable artifact","Keep all Flowable modules at the same version","Run dependency:tree in CI to catch shaded/excluded client jars"],"tags":["flowable","classpath","dependency","http-client","configuration"],"backgroundTag":"missing-dependency","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}