{"record":{"id":"99123d4e7ab3c261","repo":"flowable/flowable-engine","slug":"could-not-find-org-flowable-camel-impl-camelbehavi","errorCode":null,"errorMessage":"Could not find org.flowable.camel.impl.CamelBehaviorDefaultImpl: ","messagePattern":"Could not find org\\.flowable\\.camel\\.impl\\.CamelBehaviorDefaultImpl: ","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/factory/DefaultActivityBehaviorFactory.java","lineNumber":252,"sourceCode":"                    break;\n                }\n            }\n\n            if (behaviorExtension != null) {\n                fieldExtensions.remove(behaviorExtension);\n            }\n\n            if (theClass == null) {\n                // Default Camel behavior class\n                theClass = Class.forName(\"org.flowable.camel.impl.CamelBehaviorDefaultImpl\");\n            }\n\n            List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(fieldExtensions);\n            addExceptionMapAsFieldDeclaration(fieldDeclarations, task.getMapExceptions());\n            return (ActivityBehavior) ClassDelegate.defaultInstantiateDelegate(theClass, fieldDeclarations);\n\n        } catch (ClassNotFoundException e) {\n            throw new ActivitiException(\"Could not find org.flowable.camel.impl.CamelBehaviorDefaultImpl: \", e);\n        }\n    }\n\n    private void addExceptionMapAsFieldDeclaration(List<FieldDeclaration> fieldDeclarations, List<MapExceptionEntry> mapExceptions) {\n        FieldDeclaration exceptionMapsFieldDeclaration = new FieldDeclaration(EXCEPTION_MAP_FIELD, mapExceptions.getClass().toString(), mapExceptions);\n        fieldDeclarations.add(exceptionMapsFieldDeclaration);\n\n    }\n\n    @Override\n    public ShellActivityBehavior createShellActivityBehavior(ServiceTask serviceTask) {\n        List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(serviceTask.getFieldExtensions());\n        return (ShellActivityBehavior) ClassDelegate.defaultInstantiateDelegate(ShellActivityBehavior.class, fieldDeclarations);\n    }\n\n    @Override\n    public ActivityBehavior createBusinessRuleTaskActivityBehavior(BusinessRuleTask businessRuleTask) {\n        BusinessRuleTaskDelegate ruleActivity = null;","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/factory/DefaultActivityBehaviorFactory.java#L234-L270","documentation":"DefaultActivityBehaviorFactory.createCamelActivityBehavior tries to instantiate the default Camel bridge class org.flowable.camel.impl.CamelBehaviorDefaultImpl reflectively. If the class is not on the classpath, it throws ActivitiException ('Could not find org.flowable.camel.impl.CamelBehaviorDefaultImpl: ', cause = ClassNotFoundException).","triggerScenarios":"A BPMN process contains a camel task (serviceTask of type 'camel') but the flowable-camel module is not on the runtime classpath.","commonSituations":"Deploying a process with camel tasks to an application that didn't include the flowable-camel dependency; moving from a fat WAR to a slim build that dropped the module; version mismatch where the camel bridge class moved packages.","solutions":["Add the flowable-camel dependency (org.flowable:flowable-camel) matching your engine version to the classpath","If camel tasks are not intended, remove/redefine the camel service tasks in the BPMN","Register a custom CamelActivityBehavior via the ActivityBehaviorFactory to control instantiation yourself","Verify no version conflict (activiti vs flowable coordinates) excludes the jar"],"exampleFix":"// before (pom.xml)\n<dependency>\n  <groupId>org.flowable</groupId>\n  <artifactId>flowable-engine</artifactId>\n</dependency>\n// after\n<dependency>\n  <groupId>org.flowable</groupId>\n  <artifactId>flowable-engine</artifactId>\n</dependency>\n<dependency>\n  <groupId>org.flowable</groupId>\n  <artifactId>flowable-camel</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"// fail fast at startup if camel tasks will be used\ntry {\n  Class.forName(\"org.flowable.camel.impl.CamelBehaviorDefaultImpl\");\n} catch (ClassNotFoundException e) {\n  throw new IllegalStateException(\"flowable-camel module missing from classpath\");\n}","typeGuard":"static boolean camelModulePresent() {\n  try { Class.forName(\"org.flowable.camel.impl.CamelBehaviorDefaultImpl\"); return true; }\n  catch (ClassNotFoundException e) { return false; }\n}","tryCatchPattern":"try {\n  repositoryService.createDeployment().addClasspathResource(processXml).deploy();\n} catch (ActivitiException e) {\n  if (e.getMessage().contains(\"CamelBehaviorDefaultImpl\")) { /* add flowable-camel dependency */ }\n}","preventionTips":["Add org.flowable:flowable-camel whenever processes contain camel tasks","Check dependency tree for exclusions/version conflicts on the camel module","Scan BPMN resources at build time for camel task types and assert the dependency"],"tags":["camel","classpath","dependency","bpmn"],"backgroundTag":"class-not-found","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"}