Bug 1011008 - Duplicate entry 'ADMIN' for key 'PRIMARY' error raises when viewing tasks that user with role ADMIN can claim
Summary: Duplicate entry 'ADMIN' for key 'PRIMARY' error raises when viewing tasks tha...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER4
: 6.0.0
Assignee: Mauricio Salatino
QA Contact: Radovan Synek
URL:
Whiteboard:
Depends On:
Blocks: 997012
TreeView+ depends on / blocked
 
Reported: 2013-09-23 13:23 UTC by Radovan Synek
Modified: 2014-08-06 20:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:06:29 UTC
Type: Bug
Embargoed:


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

Description Radovan Synek 2013-09-23 13:23:45 UTC
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 10:52:23 UTC
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 14:39:27 UTC
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 14:47:07 UTC
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 15:09:54 UTC
Verified on BPMS-6.0.0.ER4

Comment 7 Radovan Synek 2014-03-18 14:52:01 UTC
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.