customTaskInstance example failing with error
rossputin Sep 25, 2007 9:16 AMHi guys,
I tried to run 'ant test' in /jbpm-jpdl-3.2.1/examples/customTaskInstance today, and the same in 3.2.2, first of all it failed to compile, the 'compile.test' target seems to be failing, unless there is some config I need to do first.
Anyhow, after some tweaking of example.base.build.xml to make it work... see...
<target name="create.manifest"> <mkdir dir="target/META-INF" /> <manifest file="target/META-INF/MANIFEST.MF"> <attribute name="Implementation-Title" value="jBPM Core Library"/> <attribute name="Implementation-Version" value="${lib.jbpm.jpdl.version} (date:${now})"/> <attribute name="Implementation-URL" value="http://www.jboss.org/"/> <attribute name="Implementation-Vendor" value="JBoss Inc."/> <attribute name="Implementation-Vendor-Id" value="http://www.jboss.org/"/> </manifest> </target> <target name="package.jar" depends="compile, create.manifest"> <jar jarfile="target/jbpm-custom-task.jar" manifest="target/META-INF/MANIFEST.MF"> <fileset dir="target/classes" /> </jar> </target>
I got the test running... but then it bombed out with the following error...
org.jbpm.taskmgmt.exe.TaskInstance java.lang.ClassCastException: org.jbpm.taskmgmt.exe.TaskInstance at org.jbpm.taskinstance.CustomTaskControllerHandler.initializeTaskVariables(Unknown Source) at org.jbpm.taskmgmt.def.TaskController.initializeVariables(TaskController.java:82) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157) at org.jbpm.taskmgmt.def.TaskController$$EnhancerByCGLIB$$edd862d3.initializeVariables() at org.jbpm.taskmgmt.exe.TaskInstance.initializeVariables(TaskInstance.java:149) at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:131) at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168) at org.jbpm.graph.def.Node.enter(Node.java:319) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157) at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$28c8528a.enter() at org.jbpm.graph.def.Transition.take(Transition.java:151) at org.jbpm.graph.def.Node.leave(Node.java:394) at org.jbpm.graph.node.StartState.leave(StartState.java:70) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157) at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$28c8528a.leave() at org.jbpm.graph.exe.Token.signal(Token.java:195) at org.jbpm.graph.exe.Token.signal(Token.java:140) at org.jbpm.taskinstance.CustomTaskInstanceTest.createNewProcessInstance(Unknown Source) at org.jbpm.taskinstance.CustomTaskInstanceTest.testCustomTaskInstance(Unknown Source)
I left the hibernate.cfg.xml and jbpm.cfg.xml files untouched.
Possibly I was running the ant targets from the wrong place, or I forgot to configure something?
Anyhow, any help is greatly appreciated,
regards
Ross