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...
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
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:
Last Closed: 2014-08-06 16:06:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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:

Duplicate entry 'ADMIN' for key 'PRIMARY'

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):
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)


6.0.x commit 
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.