KB Article #182263

After a successfully installation ClusterNode does not start.

Problem

CN is not started due to error :

2022-07-05 08:39:12,602 - FATAL [Cluster Thread 90] (CycloneApp) - null
org.apache.openjpa.persistence.EntityExistsException: An object of type "com.cyclonecommerce.cachet.administration.Group" with oid "0" already exists in this context; another cannot be persisted.

Reason : SQL queries used in the past could have corrupted the GroupResources table.

The issue appears now at startup when the server tries to create a new role permission that was introduced in the B2Bi 2.6 UP2022-05 release. And this operation fails because there is another permissions already stored in the database with the same internal OID. These OIDs are automatically generated by the JPA persistence layer.


WARNING : The procedure will do some change in the database, if you are not sure about the exact cause of the error please open a support case before apply this procedure.


Resolution

1. Replace the 0 id from GroupsOrRoles table with a valid Id (e.g 1)
2. Replace the id from linked tables with the same id 1. Linked tables are: UserGroups and GroupResources
3. Start B2Bi and check that the the error is no more present in CN logs.

*Extra Notes:

Every entry should be replaced with a unique value (i.e 1) for the following tables:

-UserGroups correspond with the UserOid and GroupOID.

-GroupResources correspond with GroupOID.

-GroupsOrRoles correspond with OID.