flowable/flowable-engine · error · ELException

Unabled to find ExpressionFactory of type ${className}

Error message

Unabled to find ExpressionFactory of type ${className}

What it means

ExpressionFactory.newInstance(className, properties) wraps ClassNotFoundException in ELException when the configured ExpressionFactory implementation class cannot be loaded by the class loader. The message says 'Unabled to find'.

Source

Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/javax/el/ExpressionFactory.java:182

                final Lock writeLock = cacheValue.getLock().writeLock();
                writeLock.lock();
                try {
                    className = cacheValue.getFactoryClassName();
                    if (className == null) {
                        className = discoverClassName(tccl);
                        cacheValue.setFactoryClassName(className);
                    }
                    if (tccl == null) {
                        clazz = Class.forName(className);
                    } else {
                        clazz = tccl.loadClass(className);
                    }
                    cacheValue.setFactoryClass(clazz);
                } finally {
                    writeLock.unlock();
                }
            } catch (ClassNotFoundException e) {
                throw new ELException("Unabled to find ExpressionFactory of type " + className, e);
            }
        }

        ExpressionFactory result;

        try {
            Constructor<?> constructor = null;
            // Do we need to look for a constructor that will take properties?
            if (properties != null) {
                try {
                    constructor = clazz.getConstructor(Properties.class);
                } catch (SecurityException se) {
                    throw new ELException(se);
                } catch (NoSuchMethodException nsme) {
                    // This can be ignored
                    // This is OK for this constructor not to exist
                }
            }

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Correct the factory class name in the configuration/system property
  2. Add the JAR containing the factory class to the classpath
  3. Remove the custom property so the default discovery mechanism is used
  4. Verify with Class.forName("<className>") in the same classloader

Example fix

// before
-Djavax.el.ExpressionFactory=org.flowable.el.MyFactory // class missing
// after
-Djavax.el.ExpressionFactory=de.odysseus.el.ExpressionFactoryImpl // with juel jar on classpath
Defensive patterns

Strategy: validation

Validate before calling

try {
  Class.forName(factoryClassName, false, Thread.currentThread().getContextClassLoader());
} catch (ClassNotFoundException e) {
  throw new IllegalStateException("ExpressionFactory class missing: " + factoryClassName, e);
}

Try / catch

try {
  return ExpressionFactory.newInstance(className, properties);
} catch (ELException e) {
  return ExpressionFactory.newInstance(); // fallback to default factory
}

Prevention

When it happens

Trigger: Setting javax.el.ExpressionFactory system property or a custom class name in a properties file to a class not on the classpath.

Common situations: Upgrading Flowable/moving from JUEL to the EL implementation where old factory class names linger in config; fat-jar classpath issues; typos in fully-qualified class names.

Related errors


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