cancel
Showing results for 
Search instead for 
Did you mean: 

Error Starting Engine

rodolfobarbeiro
Champ in-the-making
Champ in-the-making
I'm trying to start the engine through my application, but the following error occurs:

org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration cannot be cast to org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl


Someone can tell me why?
6 REPLIES 6

frederikherema1
Star Contributor
Star Contributor
Do you have multiple versions of the activiti library on your classpath?

rodolfobarbeiro
Champ in-the-making
Champ in-the-making
Hi,

No, there is only one version.

I think I know what's going on…

My scenario is:

I build an application that uses "Activiti Engine" and I use my application within an OSGi environment. As a standalone application works correctly, but within the OSGi environment the error occurs.


It's probably some setting that is missing, but do not know.


Thanks for the reply!

rodolfobarbeiro
Champ in-the-making
Champ in-the-making
This is the error that occurs when starting the activiti engine inside the OSGi environment:

14-06-2011 17:28:08,736 [SpringOsgiExtenderThread-29] ERROR Error while closing command context
java.lang.ClassCastException: org.activiti.engine.impl.persistence.entity.PropertyEntity cannot be cast to org.activiti.engine.impl.db.PersistentObject
at org.activiti.engine.impl.db.DbSqlSession.selectById(DbSqlSession.java:207)
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:619)
at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:872)
at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:77)

I'm using version 5.6.

Any idea what's going on?

frederikherema1
Star Contributor
Star Contributor
Looks like both classes are loaded using a different classloader. Not really an OSGI-expert myself Smiley Wink

bhj2
Champ in-the-making
Champ in-the-making
I have the same exception. Did you find a solution?

mathiasd
Champ in-the-making
Champ in-the-making
I had the same problem using this line :

ProcessEngine engine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti-application-context.xml", "processEngine").buildProcessEngine();

The error was that the beanName expected here is the bean of the configuration not of the processEngine itself. The correct line is :

ProcessEngine engine = ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti-application-context.xml", "processEngineConfiguration").buildProcessEngine();