{"record":{"id":"78e721f7d5c25656","repo":"flowable/flowable-engine","slug":"class-classname-not-found","errorCode":null,"errorMessage":"Class ${className} not found","messagePattern":"Class (.+?) not found","errorType":"exception","errorClass":"ELException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/ExpressionFactoryImpl.java","lineNumber":427,"sourceCode":"\n\tprotected TreeBuilder createDefaultTreeBuilder(Feature... features) {\n\t\treturn new Builder(features);\n\t}\n\n\tprivate Class<?> load(Class<?> clazz, Properties properties) {\n\t\tif (properties != null) {\n\t\t\tString className = properties.getProperty(clazz.getName());\n\t\t\tif (className != null) {\n\t\t\t\tClassLoader loader;\n\t\t\t\ttry {\n\t\t\t\t\tloader = Thread.currentThread().getContextClassLoader();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new ELException(\"Could not get context class loader\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\treturn loader == null ? Class.forName(className) : loader.loadClass(className);\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\tthrow new ELException(\"Class \" + className + \" not found\", e);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new ELException(\"Class \" + className + \" could not be instantiated\", e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\t@Override\n\tpublic final <T> T coerceToType(Object obj, Class<T> targetType) {\n\t\treturn converter.convert(obj, targetType);\n\t}\n\n\t@Override\n\tpublic final ObjectValueExpression createValueExpression(Object instance, Class<?> expectedType) {\n\t\treturn new ObjectValueExpression(converter, instance, expectedType);\n\t}\n","sourceCodeStart":409,"sourceCodeEnd":445,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/ExpressionFactoryImpl.java#L409-L445","documentation":"load() looks up a class name from the factory properties (keyed by the requesting class's name) and loads it via the context class loader or Class.forName. A ClassNotFoundException is wrapped as ELException 'Class X not found' — the property names a class that does not exist on the classpath.","triggerScenarios":"ExpressionFactoryImpl construction where a properties key (e.g. the TypeConverter or TreeBuilder property key) maps to a class name that is misspelled, not deployed, or in a jar missing from the runtime classpath.","commonSituations":"Renamed/moved class after a library upgrade while properties file still references the old FQN; missing dependency jar in the deployed WAR; typo in fully-qualified class name in juel/EL properties.","solutions":["Correct the fully-qualified class name in the properties to a class present on the classpath","Add the jar/module containing the named class to the runtime classpath","Remove the property entry to fall back to the built-in default implementation"],"exampleFix":"// before\nde.odysseus.el.TypeConverter = com.acme.OldConverter\n\n// after\nde.odysseus.el.TypeConverter = com.acme.NewConverter","handlingStrategy":"validation","validationCode":"// Pre-check every class name referenced by factory properties\nString name = props.getProperty(\"de.odysseus.el.TypeConverter\");\nif (name != null && Class.forName(name, false, getClass().getClassLoader()) == null) {\n    throw new IllegalStateException(\"Configured class not on classpath: \" + name);\n}","typeGuard":null,"tryCatchPattern":"try {\n    ExpressionFactory factory = new ExpressionFactoryImpl(props);\n} catch (ELException e) {\n    if (e.getCause() instanceof ClassNotFoundException) {\n        log.error(\"Add missing jar or correct the FQN in EL properties: {}\", e.getCause().getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["Grep properties files for FQNs and verify each against the classpath in CI","Update property files whenever referenced classes are renamed or repackaged","Use a dependency report to confirm the jar containing custom classes ships in the artifact"],"tags":["classpath","reflection","el","configuration","flowable"],"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-14T05:17:10.506Z"}