Bug 1011008 - Duplicate entry 'ADMIN' for key 'PRIMARY' error raises when viewing tasks that user with role ADMIN can claim
Duplicate entry 'ADMIN' for key 'PRIMARY' error raises when viewing tasks tha...
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high
: ER4
: 6.0.0
Assigned To: Mauricio Salatino
Radovan Synek
:
Depends On:
Blocks: 997012
  Show dependency treegraph
 
Reported: 2013-09-23 09:23 EDT by Radovan Synek
Modified: 2014-08-06 16:06 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:06:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
error stacktrace (25.87 KB, text/x-log)
2013-09-23 09:23 EDT, Radovan Synek
no flags Details

  None (edit)
Description Radovan Synek 2013-09-23 09:23:45 EDT
Created attachment 801643 [details]
error stacktrace

Description of problem:
Having business central configured with production DB (tried with mysql55 and mssql2008R2), user with ADMIN role cannot see available tasks. Exception raises in server log (see the attached stacktrace) saying:

mysql55
-------
Duplicate entry 'ADMIN' for key 'PRIMARY'

mssql2008R2
-----------
Violation of PRIMARY KEY constraint 'PK__Organiza__3213E83F02B769D4'. Cannot insert duplicate key in object 'dbo.OrganizationalEntity'. The duplicate key value is (ADMIN)


I was able to see this issue when querying for tasks via REST, but it can be reproduced more easily via GUI.

Steps to Reproduce:
1. configure business central with production DB
2. log in using account with ADMIN role
3. navigate to Tasks -> Tasks list
4. see the server log

Version-Release number of selected component (if applicable):
BPMS-6.0.0.ER3
Comment 1 Maciej Swiderski 2013-09-27 06:52:23 EDT
this should already be solved by JBPM-4134 that introduced way to filter out some of the groups to not be used by task service. It mainly targets roles for web application as they are actually roles and not ht groups so should not be seen as groups in task service at all. By default analyst and admin roles are filtered out from being added to task service. More can be added to restricted-groups.properties file included in the web application (WEB-INF/classes)

master
https://github.com/droolsjbpm/jbpm/commit/89cea706c19f1f5a1d5d03ec06e623167e657639
https://github.com/droolsjbpm/kie-wb-distributions/commit/65bab2dfb827ff5706096928e8014d0ccf8a952e
https://github.com/droolsjbpm/jbpm-console-ng/commit/eefbd479f2d19c8cbcd68f7023c7f8818219ad8f

6.0.x commit 
https://github.com/droolsjbpm/jbpm/commit/7c53992af9d3d03f54ed222279289368750025be
https://github.com/droolsjbpm/kie-wb-distributions/commit/2b157ab600b8d49274f50e888cc7ffefef9344b3
https://github.com/droolsjbpm/jbpm-console-ng/commit/46f2516b8ff59ab3ec0e1e869a2483c80744ecd7
Comment 2 Ivo Bek 2013-09-27 10:39:27 EDT
Will the fix cover also quite similar issue with "Administrator"? That's because I see the exception in Postgresql 9.2. I use ADMIN group so I don't know where the Administration appeared from.

Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "organizationalentity_pkey"
  Detail: Key (id)=(Administrator) already exists.
Comment 3 Maciej Swiderski 2013-09-27 10:47:07 EDT
there was additional fix on the way so moving this back to assigned as it won't be completely included in ER4
Comment 6 Radovan Synek 2013-10-17 11:09:54 EDT
Verified on BPMS-6.0.0.ER4
Comment 7 Radovan Synek 2014-03-18 10:52:01 EDT
qe_test_coverage: roles have been changed in business-central

Note You need to log in before you can comment on or make changes to this bug.