When executing the script dev/02-initsecurity.sh
to generate authentication tokens for all DPM applications during the SCH initialisation, you can provide an argument to specify the componentId suffix (default is 000). However, if you already did this process on the same DB, you may face the following error:
Caused by: <openjpa-3.1.1-r1440702 fatal store error> org.apache.openjpa.persistence.EntityExistsException: (conn=5928745) Duplicate entry 'jobrunner_mysuffix' for key 'U_CMPONNT_ID' {prepstmnt 2068100669 UPDATE COMPONENT SET ATTRIBUTES_UPDATED_ON = ?, ID = ?, LAST_MODIFIED_TIME = ?, LAST_VALIDATED_ON = ?, REGISTERED_ON = ? WHERE INTERNAL_ID = ?} [code=1062, state=23000]
This exception happened because there is already a record for each component with the suffix _mysuffix
in the database security, table COMPONENT, and column ID.
If you check the database, you might notice that the component ID suffixes could be in capital letters _MYSUFFIX
and the exception is still being triggered. Although Control Hub is not case-sensitive, MySQL databases are case-sensitive. So you need to execute the script with the componentId suffix parameter matching the entries from the DB, in this example with uppercase letters:
dev/02-initsecurity.sh _MYSUFFIX