View source | Discuss this page | Page history | Printable version   

Duplicated Data Into AD ORGMODULE

Bulbgraph.png   This problem was reported in this [issue]. The problem has been resolved in 3.0PR17Q3.

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: 
/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 
               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.

Warn-icon.png   Anyway please contact with Openbravo Support Team in order to notify this uncommon situation in the following site.

Retrieved from ""

This page has been accessed 766 times. This page was last modified on 4 May 2017, at 11:07. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.