-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
Environment (Required on creation):
- All databases
- All setups that use "activiti-context.xml"
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
The class "org.camunda.bpm.engine.test.spring.SpringConfigurationHelper" cannot be found when starting an engine configured via "activiti-context.xml".
In an embedded application, you will see the following stacktrace:
Exception in thread "main" org.camunda.bpm.engine.ProcessEngineException: couldn't initialize process engine from spring configuration resource activiti-context.xml: ENGINE-09017 Cannot load class 'org.camunda.bpm.engine.test.spring.SpringConfigurationHelper': org.camunda.bpm.engine.test.spring.SpringConfigurationHelper at org.camunda.bpm.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:146) at org.camunda.bpm.engine.ProcessEngines.init(ProcessEngines.java:125) at org.camunda.bpm.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:248) at org.camunda.bpm.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:237) at org.camunda.bpm.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:233) at com.github.ConfigMain.main(ConfigMain.java:11) Caused by: org.camunda.bpm.engine.ClassLoadingException: ENGINE-09017 Cannot load class 'org.camunda.bpm.engine.test.spring.SpringConfigurationHelper': org.camunda.bpm.engine.test.spring.SpringConfigurationHelper at org.camunda.bpm.engine.impl.util.EngineUtilLogger.classLoadingException(EngineUtilLogger.java:145) at org.camunda.bpm.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:111) at org.camunda.bpm.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:136) ... 5 more Caused by: java.lang.ClassNotFoundException: org.camunda.bpm.engine.test.spring.SpringConfigurationHelper at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:398) at org.camunda.bpm.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:88) ... 6 more
Steps to reproduce (Required on creation):
- Create an "activiti-context.xml" configuration in your project (e.g., embedded engine use case)
- Call ProcessEngines.getDefaultProcessEngine() in your application to create the engine
- Start your application
Observed Behavior (Required on creation):
- ClassNotFoundException for "org.camunda.bpm.engine.test.spring.SpringConfigurationHelper"
Expected behavior (Required on creation):
- Context is parsed successfully and the engine is created
Root Cause (Required on prioritization):
- The name of the class is "org.camunda.bpm.engine.spring.SpringConfigurationHelper" rather than "org.camunda.bpm.engine.*test.*spring.SpringConfigurationHelper"
Solution Ideas (Optional):
Adjust "org.camunda.bpm.engine.*test.*spring.SpringConfigurationHelper " to "org.camunda.bpm.engine.spring.SpringConfigurationHelper" (remove the ".test") in ProcessEngines class.