AnsweredAssumed Answered

NoSuchMethodException: org.activiti.spring.SpringConfigurationHelper.buildProcessEngine

Question asked by gokceng1 on Jan 25, 2015
Latest reply on Feb 9, 2015 by gokceng1
Hi,
I'm trying to call
<blockcode>mvn clean install -P check,checkspring</blockcode>
There is no problem when I use check only but checkspring causes problems on tests.

For example
activiti-spring\src\test\java\org\activiti\engine\test\api\event\ActivityEventsTest.java
class, all methods throw this exception:
<blockcode>
org.activiti.engine.ActivitiException: couldn't initialize process engine from spring configuration resource file:/…./activiti-spring/target/test-classes/activiti-context.xml: org.activiti.spring.SpringConfigurationHelper.buildProcessEngine(java.net.URL)
   at org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:130)
   at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:109)
   at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:224)
   at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:217)
   at org.activiti.engine.impl.test.PluggableActivitiTestCase.initializeProcessEngine(PluggableActivitiTestCase.java:47)
   at org.activiti.engine.impl.test.AbstractActivitiTestCase.runBare(AbstractActivitiTestCase.java:89)
   at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
   at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
   at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
   at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
   at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.NoSuchMethodException: org.activiti.spring.SpringConfigurationHelper.buildProcessEngine(java.net.URL)
   at java.lang.Class.getMethod(Class.java:1607)
   at org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:121)
   … 21 more
</blockcode>

As far as I see, <code>org.activiti.spring.SpringConfigurationHelper#buildProcessEngine<code> method is 'private static'. Making its modifier something else doesn't help. There is no dependency to activiti-spring from activiti-engine. So it couldn't load the class in first place.
Thanks.

Outcomes