Chris Melas [https://community.jboss.org/people/melc] created the discussion
"jbpm 5.3 - groups" To view the discussion, visit: https://community.jboss.org/message/738279#738279 -------------------------------------------------------------- Hello, I've noticed in 3 different computer systems (centos, win xp, win vista) that when creating a process with a human task that only has a groupId specified (i.e. https://community.jboss.org/servlet/JiveServlet/showImage/2-738279-18646/image.png https://community.jboss.org/servlet/JiveServlet/downloadImage/2-738279-18646/310-139/image.png ), the following exception is thrown when reaching the point of the human task. *6:01:28,031 ERROR [stderr] (Thread-13) java.lang.IllegalArgumentException: org.hibernate.QueryParameterException: could not locate named parameter [userId]* 16:01:28,031 ERROR [stderr] (Thread-13) at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:206) *16:01:28,031 ERROR [stderr] (Thread-13) at org.jbpm.task.service.TaskServiceSession.getTasksAssignedAsPotentialOwnerByStatusByGroup(TaskServiceSession.java:1011)* 16:01:28,031 ERROR [stderr] (Thread-13) at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:356) 16:01:28,031 ERROR [stderr] (Thread-13) at org.jbpm.task.service.hornetq.HornetQTaskServerHandler.messageReceived(HornetQTaskServerHandler.java:44) 16:01:28,031 ERROR [stderr] (Thread-13) at org.jbpm.task.service.hornetq.BaseHornetQTaskServer.run(BaseHornetQTaskServer.java:85) 16:01:28,031 ERROR [stderr] (Thread-13) at java.lang.Thread.run(Thread.java:662) 16:01:28,031 ERROR [stderr] (Thread-13) Caused by: org.hibernate.QueryParameterException: could not locate named parameter [userId] 16:01:28,031 ERROR [stderr] (Thread-13) at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:99) 16:01:28,031 ERROR [stderr] (Thread-13) at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:105) 16:01:28,031 ERROR [stderr] (Thread-13) at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:437) 16:01:28,031 ERROR [stderr] (Thread-13) at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:407) 16:01:28,031 ERROR [stderr] (Thread-13) at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:201) 16:01:28,031 ERROR [stderr] (Thread-13) ... 5 more 16:01:28,031 ERROR [stderr] (Thread-33) Exception in thread "Thread-33" java.lang.RuntimeException: Client Exception with class class org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1 using port 5445 16:01:28,046 ERROR [stderr] (Thread-33) at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:134) 16:01:28,046 ERROR [stderr] (Thread-33) at java.lang.Thread.run(Thread.java:662) 16:01:28,046 ERROR [stderr] (Thread-33) Caused by: java.lang.NullPointerException 16:01:28,046 ERROR [stderr] (Thread-33) at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:62) 16:01:28,046 ERROR [stderr] (Thread-33) at org.jbpm.task.service.hornetq.HornetQTaskClientHandler.messageReceived(HornetQTaskClientHandler.java:56) 16:01:28,046 ERROR [stderr] (Thread-33) at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:120) 16:01:28,046 ERROR [stderr] (Thread-33) ... 1 more 16:01:48,031 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) java.lang.RuntimeException: Timeout : unable to retrieve results 16:01:48,031 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at org.jbpm.task.service.responsehandlers.BlockingTaskSummaryResponseHandler.getResults(BlockingTaskSummaryResponseHandler.java:41) 16:01:48,031 ERROR [stderr] (http-localhost-127.0.0.1-8080-3) at ............... ............... By checking out the code of *org.jbpm.task.service.**TaskServiceSession* at line *1011* a named query is called as follows, Query query = tpm.createQuery("TasksAssignedAsPotentialOwnerByStatusByGroup") .setParameter("userId", userId) .setParameter("groupIds", groupIds) .setParameter("language", language) .setParameter("status", status); However as seen in Taskorm.xml inside jbpm-human-task-core-5.3.0.Final.jar/META-INF, indeed the named query has no userId parameter +<named-query name="TasksAssignedAsPotentialOwnerByStatusByGroup">+ + <query>+ +select+ + new org.jbpm.task.query.TaskSummary(+ + t.id,+ + t.taskData.processInstanceId,+ + name.text,+ + subject.text,+ + description.text,+ + t.taskData.status,+ + t.priority,+ + t.taskData.skipable,+ + t.taskData.actualOwner,+ + t.taskData.createdBy,+ + t.taskData.createdOn,+ + t.taskData.activationTime,+ + t.taskData.expirationTime,+ + t.taskData.processId,+ + t.taskData.processSessionId)+ +from+ + Task t+ + left join t.taskData.createdBy+ + left join t.taskData.actualOwner+ + left join t.subjects as subject+ + left join t.descriptions as description+ + left join t.names as name,+ + OrganizationalEntity potentialOwners+ +where+ + t.archived = 0 and+ + potentialOwners.id = :groupId and+ + potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and+ + (+ + name.language = :language+ + or t.names.size = 0+ + ) and+ + (+ + subject.language = :language+ + or t.subjects.size = 0+ + ) and+ + (+ + description.language = :language+ + or t.descriptions.size = 0+ + ) and+ + t.taskData.status in (:status) and+ + t.taskData.expirationTime is null+ + </query>+ + <!-- hint name="org.hibernate.timeout" value="200"/ -->+ + </named-query>+ Is this the case or am i missing something?? Thanks -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/738279#738279] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user