AnsweredAssumed Answered

Throws Exception: taskService.createTaskQuery().taskName

Question asked by juacosta on Oct 10, 2014
Latest reply on Oct 13, 2014 by juacosta
Description
When invoking
taskService.createTaskQuery().taskName("Task Name")
, an exception is thrown indicating the method "taskName" does not exists.

Symptoms
In debug, the value of nameLike passed into
public TaskQueryImpl taskNameLike(String nameLike)
is set to
null


Conditions
Activiti v5.16.3
H2 v 1.4.181
JDK 1.8.0_20

Used sample from the Book Activiti in Action to isolate issue

The code that breaks

   List<Task> availableTaskList = taskService.createTaskQuery().taskName("Work on order").list();



  java.lang.NoSuchMethodError: org.activiti.engine.task.TaskQuery.taskName(Ljava/lang/String;)Lorg/activiti/engine/task/TaskQuery;
   at org.bpmnwithactiviti.chapter1.BookOrderTest.startBookOrder(BookOrderTest.java:46)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:483)
   at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
   at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
   at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
   at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
   at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
   at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Outcomes