cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.ClassCastException: StandaloneInMemProcessEngineConfiguration cannot be cast to org.activiti.spring.SpringProcessEngin

olegv
Champ in-the-making
Champ in-the-making
I am using org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration to instantiate processEngineConfiguration bean for unit testing purposes. But after upgrade to activiti 5.17.0 i got the ClassCastException.

Here is my activiti.cfg.xml


    <bean name="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration" />
    <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
        <property name="processEngineConfiguration" ref="processEngineConfiguration" />
    </bean>


Seems like in activiti-spring sources there used to be a condition


    ProcessEngineFactoryBean.java
        if (processEngineConfiguration instanceof SpringProcessEngineConfiguration) { // remark: any config can be injected, so we cannot have SpringConfiguration as member
            SpringProcessEngineConfiguration engineConfiguration = (SpringProcessEngineConfiguration) processEngineConfiguration;


But now the configuration is always cast

QUESTION: Is there a valid way to instantiate the in memory configuration with StandaloneInMemProcessEngineConfiguration?
7 REPLIES 7

jbarrez
Star Contributor
Star Contributor

olegv
Champ in-the-making
Champ in-the-making
Yep, it is the same! Just curious is this going to be released soon? 5.17.1? Or it makes sense to look for a workaround?

jbarrez
Star Contributor
Star Contributor
Most likely we'll have a 5.18, but not soon.

The workaround is to create your own Configuration class now, which isn't that hard, and use the fixed one in a new release.

cirerenat
Champ in-the-making
Champ in-the-making
When is 5.18 going to be released?

jbarrez
Star Contributor
Star Contributor
We've planned it for July. Needs some big commits first before we can wrap up this (big) release

keymaster
Champ in-the-making
Champ in-the-making
Is there a roadmap for this and other releases?

jbarrez
Star Contributor
Star Contributor
5.18 is still planned for the end of this month.

After that, we'll work on v6 and port fixes to v5. More info about v6 -> http://www.jorambarrez.be/blog/2015/06/18/activiti-6-launch/