Bug 1266556

Summary: TaskQueryBuilder tests failing - not a group by expression
Product: [Retired] JBoss BPMS Platform 6 Reporter: Tibor Zimanyi <tzimanyi>
Component: jBPM CoreAssignee: Shelly McGowan <smcgowan>
Status: CLOSED EOL QA Contact: Tibor Zimanyi <tzimanyi>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.2.0CC: ibek, kverlaen
Target Milestone: ER5Keywords: Regression, TestBlocker
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:35:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tibor Zimanyi 2015-09-25 15:30:26 UTC
Description of problem:

Test TaskQueryBuilderLocalTest.testGetTasksByVariousFieldsWithUserGroupCallback(), which is located in module jbpm-human-task fails when executed on supported production DB systems. Exception thrown on Oracle 11gR2 is here: [1]. 

When tested with hibernate.show_sql=true property, it fails on this SQL statement: [2].

The problem is related to group by expression. All columns should be in this case part of group by expression or as @mriet noted, DISTINCT should be used instead. Problematic method that adds group by clause is TaskQueryCriteriaUtil.groupTaskIdWhenLefOuterJoinsPresent.

[1] http://pastebin.com/nmtjaZbC
[2] http://pastebin.com/8nHdB4vK

Version-Release number of selected component (if applicable): 6.2.0.ER3


How reproducible:

Execute TaskQueryBuilderLocalTest.testGetTasksByVariousFieldsWithUserGroupCallback() on one of supported production database systems.

Comment 3 Marco Rietveld 2015-10-28 02:45:14 UTC
Fixed. Commits: 

6.3.x: 
https://github.com/droolsjbpm/jbpm/commit/4b9cf010

master; 
https://github.com/droolsjbpm/jbpm/commit/0987f956

Comment 4 Marco Rietveld 2015-10-28 09:47:52 UTC
These commits were also part of the fix: 

6.3.x: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/30b35244

master: 
https://github.com/droolsjbpm/droolsjbpm-integration/commit/df5e8743

Comment 6 Tibor Zimanyi 2015-11-10 13:45:57 UTC
Verified in 6.2.0.ER5 by running community test suite on supported DB systems. All tests that were failing pass now.