-
1. Re: getTasksAssignedAsPotentialOwnerByStatus fails when User has no groups
swiderski.maciej Jul 13, 2012 11:47 AM (in response to jhrobbin)Quickly run a test with similar scenario where callback return empty list and everything worked just fine. Could you please create test case and file a jira issue for this (you can assign me directly to it) so I will take a look at it immediately.
Cheers
-
2. Re: getTasksAssignedAsPotentialOwnerByStatus fails when User has no groups
jhrobbin Jul 13, 2012 11:58 AM (in response to swiderski.maciej)Hi Maciej,
Where can I find the test case you ran to test this? Is it in GitHub?
Many thanks,
Justin
-
3. Re: getTasksAssignedAsPotentialOwnerByStatus fails when User has no groups
swiderski.maciej Jul 13, 2012 12:06 PM (in response to jhrobbin)I slightly enhanced one of the tests (TaskServiceLifeCycleBaseSyncTest.testClaimNextAvailable) to make use of user group callback. But you run into this issue maybe your test case will be more reliable than enhanced one I tried.
HTH
-
4. Re: getTasksAssignedAsPotentialOwnerByStatus fails when User has no groups
quangtin3 Oct 29, 2013 10:44 PM (in response to jhrobbin)We have the same error as in Justin Robbins case. In our own implement of org.jbpm.task.identity.UserGroupCallback if
public List<String> getGroupsForUser(..)
return empty list, we will have the same exception
08:26:11,737 ERROR [org.hibernate.hql.internal.ast.ErrorCounter] (http--127.0.0.1-8080-8) <AST>:0:0: unexpected end of subtree: <AST>:0:0: unexpected end of subtree at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3146) [hibernate-core-4.0.1.Final.jar:4.0.1.Final] <...intended remove....> at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:252) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final] at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParameters(TaskPersistenceManager.java:352) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParametersInTransaction(TaskPersistenceManager.java:289) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParametersInTransaction(TaskPersistenceManager.java:315) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.TaskServiceSession.getTasksAssignedAsPotentialOwnerByStatus(TaskServiceSession.java:801) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] at org.jbpm.task.service.local.LocalTaskService.getTasksAssignedAsPotentialOwnerByStatus(LocalTaskService.java:177) [jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final] <.... >
Looking around I found:
- Related Hibernate Issue [HHH-8091] Hibernate produces SQL - "in ()" - which is invalid in at least Oracle, MySQL and Postgres - Hibernate JIRA
- A working workaround from StackOverflow http://stackoverflow.com/questions/8450400/hql-where-in-for-empty-list-crashes
I know this is an old thread, but hope this helps.