flowable/flowable-engine · error · ActivitiException

Could not find org.flowable.camel.impl.CamelBehaviorDefaultI

Error message

Could not find org.flowable.camel.impl.CamelBehaviorDefaultImpl: 

What it means

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).

Source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/factory/DefaultActivityBehaviorFactory.java:252

                    break;
                }
            }

            if (behaviorExtension != null) {
                fieldExtensions.remove(behaviorExtension);
            }

            if (theClass == null) {
                // Default Camel behavior class
                theClass = Class.forName("org.flowable.camel.impl.CamelBehaviorDefaultImpl");
            }

            List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(fieldExtensions);
            addExceptionMapAsFieldDeclaration(fieldDeclarations, task.getMapExceptions());
            return (ActivityBehavior) ClassDelegate.defaultInstantiateDelegate(theClass, fieldDeclarations);

        } catch (ClassNotFoundException e) {
            throw new ActivitiException("Could not find org.flowable.camel.impl.CamelBehaviorDefaultImpl: ", e);
        }
    }

    private void addExceptionMapAsFieldDeclaration(List<FieldDeclaration> fieldDeclarations, List<MapExceptionEntry> mapExceptions) {
        FieldDeclaration exceptionMapsFieldDeclaration = new FieldDeclaration(EXCEPTION_MAP_FIELD, mapExceptions.getClass().toString(), mapExceptions);
        fieldDeclarations.add(exceptionMapsFieldDeclaration);

    }

    @Override
    public ShellActivityBehavior createShellActivityBehavior(ServiceTask serviceTask) {
        List<FieldDeclaration> fieldDeclarations = createFieldDeclarations(serviceTask.getFieldExtensions());
        return (ShellActivityBehavior) ClassDelegate.defaultInstantiateDelegate(ShellActivityBehavior.class, fieldDeclarations);
    }

    @Override
    public ActivityBehavior createBusinessRuleTaskActivityBehavior(BusinessRuleTask businessRuleTask) {
        BusinessRuleTaskDelegate ruleActivity = null;

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Add the flowable-camel dependency (org.flowable:flowable-camel) matching your engine version to the classpath
  2. If camel tasks are not intended, remove/redefine the camel service tasks in the BPMN
  3. Register a custom CamelActivityBehavior via the ActivityBehaviorFactory to control instantiation yourself
  4. Verify no version conflict (activiti vs flowable coordinates) excludes the jar

Example fix

// before (pom.xml)
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-engine</artifactId>
</dependency>
// after
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-engine</artifactId>
</dependency>
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-camel</artifactId>
</dependency>
Defensive patterns

Strategy: validation

Validate before calling

// fail fast at startup if camel tasks will be used
try {
  Class.forName("org.flowable.camel.impl.CamelBehaviorDefaultImpl");
} catch (ClassNotFoundException e) {
  throw new IllegalStateException("flowable-camel module missing from classpath");
}

Type guard

static boolean camelModulePresent() {
  try { Class.forName("org.flowable.camel.impl.CamelBehaviorDefaultImpl"); return true; }
  catch (ClassNotFoundException e) { return false; }
}

Try / catch

try {
  repositoryService.createDeployment().addClasspathResource(processXml).deploy();
} catch (ActivitiException e) {
  if (e.getMessage().contains("CamelBehaviorDefaultImpl")) { /* add flowable-camel dependency */ }
}

Prevention

When it happens

Trigger: A BPMN process contains a camel task (serviceTask of type 'camel') but the flowable-camel module is not on the runtime classpath.

Common situations: 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.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/99123d4e7ab3c261. Report an issue: GitHub.