ricardo delarosa [http://community.jboss.org/people/rdelarosa] created the 
discussion

"ClassCastException using configuration.buildProcessEngine()"

To view the discussion, visit: http://community.jboss.org/message/536429#536429

--------------------------------------------------------------
Hi,

I am trying to obtain a reference to a "ProcessEngine" with the following code:

----------- starting code -----------------
org.jbpm.api.ProcessEngine processEngine = null ;

Configuration configuration = new Configuration();
           
       // build a process engine from a configuration
       try {
          processEngine = configuration.buildProcessEngine();  /* 
ManejadorJBPM4.java:360 */
       }
       catch(java.lang.Exception exc) {
          exc.printStackTrace();
       }
----------- ending code -----------------

But the following exception is printed on the console:

17:47:29,171 ERROR [STDERR] java.lang.ClassCastException: org.jbpm.pvm.internal.
processengine.ProcessEngineImpl cannot be cast to org.jbpm.pvm.internal.processe
ngine.ProcessEngineImpl
17:47:29,171 ERROR [STDERR]     at org.jbpm.pvm.internal.cfg.ConfigurationImpl.b
uildProcessEngine(ConfigurationImpl.java:81)
17:47:29,171 ERROR [STDERR]     at org.jbpm.api.Configuration.buildProcessEngine
(Configuration.java:105)
17:47:29,171 ERROR [STDERR]     at co.com.gestiontek.supercade.util.ManejadorJBP
M4.iniciarProceso(ManejadorJBPM4.java:360)
17:47:29,171 ERROR [STDERR]     at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.iniciarTramiteEnrolamiento(RegistroTramite.java:354)
17:47:29,171 ERROR [STDERR]     at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.iniciarTramite(RegistroTramite.java:292)
17:47:29,171 ERROR [STDERR]     at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.registrarTramite(RegistroTramite.java:228)
....

Excuse me, but I don't understand why there is a "ClassCastException" due to a 
casting from
org.jbpm.pvm.internal.processengine.ProcessEngineImpl to the same class ?

Any help is very appreciated.

Ricardo De la Rosa

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/536429#536429]

Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2035]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to