0 Replies Latest reply on Apr 2, 2013 7:05 AM by Andy McC

    Cannot make Evaluation example work consistently in Eclipse

    Andy McC Newbie



      Although I'm a newbie, please be assured that I've tried to resolve this one before posting, but it looks like others have hit similar issues in the past (https://community.jboss.org/message/750417#75041).


      I'm seeing the same issue on two different machines, one running Windows 7 the other Windows 8, both running Java SE runtime 1.7.0_17-b02.


      I'm running the example "straight out of the box" without any modifications. Here's what I'm seeing:

      • I've installed jBPM_5.4.0_final and Eclipse Helios as per the installation documentation.
      • In Eclipse, I run the Evaluation example in Debug with a breakpoint at the logger.close() instruction, and complete all the krisv, john and mary tasks.
      • In Eclipse, I then press the green arrow in the Debug session to complete the execution.
      • All good so far.
      • However, if I immediately try to rerun the Evaluation example, there is a pause and I see the following in the console window (apologies for the formatting!):


      102/04 11:23:07,519[main] ERROR workitem.wsht.GenericHTWorkItemHandler.executeWorkItem  - Tue Apr 02 11:23:07 BST 2013: Error when creating task on task server for work item id 1. Error reported by task server: Task operation request timed out

      java.lang.RuntimeException: Task operation request timed out

      at org.jbpm.task.service.SyncTaskServiceWrapper.addTask(SyncTaskServiceWrapper.java:118)

      at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:182)

      at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70)

      at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107)

      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)

      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)

      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)

      at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)

      at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)

      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)

      at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)

      at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194)

      at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)

      at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170)

      at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:140)

      at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1098)

      at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320)

      at com.sample.ProcessTest.main(ProcessTest.java:32)

      Process started ...


      The only way I've found to resolve this is to restart Jboss which I'm sure isn't the intended way.


      Here's what I've tried/noticed

      • I've tried inserting a ksession.dispose() after the logger.close() but this does not appear to clear the issue.
      • I've "clean"ed the Eclipse project and restarted the debug session.
      • I've noticed that the memory occupancy of the JBoss java task sometimes drops following this error. Is this a sign that a task has failed on the JBoss side?
      • When the ProcessTest has apparently completed, the Eclipse session still appears to have several threads that keep running (see below)


      com.sample.ProcessTest at localhost:51000

      Daemon Thread [Old I/O client worker (channelId: 2149714, / => /] (Running)

      Daemon Thread [Thread-0 (HornetQ-client-global-scheduled-threads-22781537)] (Running)

      Daemon Thread [Thread-1 (HornetQ-client-global-scheduled-threads-22781537)] (Running)

      Thread [Thread-2] (Running)

      Daemon Thread [Thread-2 (HornetQ-client-global-scheduled-threads-22781537)] (Running)

      Daemon Thread [Thread-3 (HornetQ-client-global-scheduled-threads-22781537)] (Running)

      Daemon Thread [Thread-4 (HornetQ-client-global-scheduled-threads-22781537)] (Running)

      Thread [DestroyJavaVM] (Running)


      Can anyone shed any light on what might be going wrong here? I'm keen to get moving with jBPM but I'd really like to be confident that I can get the examples working reliably before using Eclipse as my test environment.


      Many thanks!


      Andy McC