Duplicated Data Into AD ORGMODULE
If upgrading your instance to 3.0PR17Q3 you have obtained the following error:
.......................... .......................... [java] 51 [main] INFO org.openbravo.base.ExecutionLimitBaseProcess - Executing buildValidation: org.openbravo.buildvalidation.DuplicatedOrgModuleDatasets [java] 66 [main] ERROR org.openbravo.buildvalidation.BuildValidationHandler - The build validation failed. [java] 74 [main] ERROR org.openbravo.buildvalidation.BuildValidationHandler - Due to a database constraint modification, is no longer allowed to have two entries in AD_ORGMODULE table with same client, organization, module and version. There exists data in your database that do not fit this new constraint. For more information, please visit the following url: http://wiki.openbravo.com/wiki/Duplicated_Data_Into_AD_ORGMODULE [java] BUILD FAILED /home/openbravo/build.xml:465: The following error occurred while executing this line: /home/openbravo/src-util/buildvalidation/build.xml:110: Java returned: 1
This means that you have records duplicated in AD_ORGMODULE because the same dataset had been already applied twice or more times for the same client, organization and version. This uncommon situation is related with not take into account concurrency properly in the code that apply the datasets. Now the problem has fixed properly and a unique constraint avoids to have duplicated data in this table.
It should be fix it to update to 3.0PR17Q3 and this query can be very helpful.
DELETE FROM ad_orgmodule t1 WHERE EXISTS (SELECT 'x' FROM ad_orgmodule t2 WHERE t2.ad_client_id = t1.ad_client_id AND t2.ad_org_id = t1.ad_org_id AND t2.ad_module_id = t1.ad_module_id AND t2.version = t1.version AND t2.updated > t1.updated);
As you can see this query removes duplicated rows in AD_ORGMODULE for the same client, organization, module and version. Now should be possible to continue with the upgrade process.