Hello:
Tom, Roland, Koen, I hope you jBPM guys can help me (anybody else's help is apreciated
too, but as this seems to be a jBPM API problem...)
Tools:
JBoss 4.0.4GA, jBPM 3.1.2, jBPM DB is running on MySQL 5.0, JDK 1.5.08.
I'm having an exception while instancing a process.
Here is the error:
| 15:01:42,171 ERROR [STDERR] java.lang.ClassCastException:
org.jbpm.graph.def.ProcessDefinition
| 15:01:42,171 ERROR [STDERR] at
org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:138)
| 15:01:42,171 ERROR [STDERR] at
mx.com.gigante.perfil.servlet.SubmitPdfServletOO.instanciarProceso(SubmitPdfServletOO.java:169)
| 15:01:42,187 ERROR [STDERR] at
mx.com.gigante.perfil.servlet.SubmitPdfServletOO.doPost(SubmitPdfServletOO.java:138)
| 15:01:42,187 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| 15:01:42,187 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| 15:01:42,187 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| 15:01:42,187 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 15:01:42,187 ERROR [STDERR] at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 15:01:42,187 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 15:01:42,203 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 15:01:42,203 ERROR [STDERR] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| 15:01:42,203 ERROR [STDERR] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| 15:01:42,203 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| 15:01:42,203 ERROR [STDERR] at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| 15:01:42,203 ERROR [STDERR] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| 15:01:42,203 ERROR [STDERR] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| 15:01:42,203 ERROR [STDERR] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| 15:01:42,218 ERROR [STDERR] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| 15:01:42,218 ERROR [STDERR] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| 15:01:42,218 ERROR [STDERR] at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| 15:01:42,218 ERROR [STDERR] at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| 15:01:42,218 ERROR [STDERR] at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| 15:01:42,234 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
| 15:01:42,234 ERROR [GraphSession] java.lang.ClassCastException:
org.jbpm.graph.def.ProcessDefinition
|
This is my process definition:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition xmlns="urn:jbpm.org:jpdl-3.1"
| name="proceso_perfil_proveedor">
| <start-state name="start">
| <transition name="" to="creacion
contrato"></transition>
| </start-state>
| <task-node name="creacion contrato">
| <task name="crear_contrato"></task>
| <transition name="" to="1a revision
contrato"></transition>
| </task-node>
| <task-node name="1a revision contrato">
| <task name="revision_contrato_1">
| <!-- dejar tiempo suficiente (5 segundos) para que quede almacenado el correo en
la variable de tarea -->
| <timer
| name="envio_correo"
| duedate="5 seconds"
| repeat="7 days">
| <action
| class='mx.com.gigante.perfil.timers.GeneradorCorreos' />
| </timer>
| </task>
| <transition name="contrato_revisado"
| to="2a revision contrato">
| </transition>
| <transition name="contrato_cancelado"
| to="cancelacion contrato">
| </transition>
| <transition name="contrato_aprobado" to="impresion
contrato"></transition>
| <transition name="contrato_rechazado"
| to="correccion contrato">
| </transition>
| </task-node>
| <task-node name="2a revision contrato">
| <task name="revision_contrato_2" >
| </task>
| <transition name="contrato_cancelado"
| to="cancelacion contrato">
| </transition>
| <transition name="contrato_rechazado"
| to="1a revision contrato">
| <action name="reenviar_contrato"></action>
| </transition>
| <transition name="contrato_aprobado" to="impresion
contrato"></transition>
| </task-node>
| <task-node name="correccion contrato">
| <task name="correccion_contrato"></task>
| <transition name="contrato_corregido"
| to="1a revision contrato">
| </transition>
| </task-node>
| <task-node name="cancelacion contrato">
| <task name="cancelar_contrato"></task>
| <transition name="" to="end1"></transition>
| </task-node>
| <task-node name="impresion contrato">
| <task name="imprimir_contrato"></task>
| <transition name="" to="carga
documento"></transition>
| </task-node>
| <task-node name="carga documento">
| <task name="cargar_documento"></task>
| <transition name="" to="end1"></transition>
| </task-node>
| <end-state name="end1"></end-state>
| </process-definition>
|
And finally, here is the line where I'm getting the exception...
| ProcessInstance processInstance =
jbpmContext.newProcessInstance("proceso_perfil_proveedor");
|
anonymous wrote :
|
| <![CDATA[
| select pd
| from org.jbpm.graph.def.ProcessDefinition as pd
| where pd.name = :name
| order by pd.version desc
| ]]>
|
|
It looks OK to me, but as soon as the values retrieved try to be assigned to a
ProcessDefinition-type variable, I got the "ClassCastException".
I've been dealing with this problem for about a week, so any help would be mostly
apreciated.
It seems to be an error while executing the next query:
Thanks in advance.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991113#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...