Project:
View Revisions: Issue #53615 | [ Back to Issue ] | ||
Summary | 0053615: Errors when migrating brands to product characteristics when upgrading to 23Q3 | ||
Revision | 2023-10-09 16:34 by axelmercado | ||
Description | When you want to migrate to the latest version of OB 23Q3, the Retail module script "ConvertBrandIntoCharacteristic.java" fails, because if you have 2 different clients each with their respective brands, it tries to insert 2 times the "Product Characteristic tree" showing the following error: "[java] 142138 [main] ERROR org.openbravo.retail.posterminal.modulescript.ConvertBrandIntoCharacteristicData - SQL error in query: insert into ad_tree(ad_tree_id, ad_client_id, ad_org_id, createdby, updatedby, name, description, treetype, isallnodes, ad_table_id) values ('899D83A7B7E24F57911A91AE82DCA496', ?, '0', '100', '100', 'Product Characteristic tree', null, 'CH', 'Y', 'E913D17C9B3847CF92235082DBE2EC44') :org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "ad_tree_key" [java] Detail: Key (ad_tree_id)=(899D83A7B7E24F57911A91AE82DCA496) already exists. [java] 142138 [main] ERROR org.openbravo.retail.posterminal.modulescript.ConvertBrandIntoCharacteristic - Errors converting brand into characteristic [java] 142138 [main] ERROR org.openbravo.base.ExecutionLimitBaseProcess - Error executing moduleScript org.openbravo.retail.posterminal.modulescript.ConvertBrandIntoCharacteristic: @CODE=0@ERROR: duplicate key value violates unique constraint "ad_tree_key" [java] Detail: Key (ad_tree_id)=(899D83A7B7E24F57911A91AE82DCA496) already exists. [java] javax.servlet.ServletException: @CODE=0@ERROR: duplicate key value violates unique constraint "ad_tree_key" [java] Detail: Key (ad_tree_id)=(899D83A7B7E24F57911A91AE82DCA496) already exists.". This is because the (ad_tree_id)=899D83A7B7E24F57911A91AE82DCA496) is inserted in the database for each existing customer that uses the product characteristic tree (See attached screenshots). <SqlMethod name="insertCharacteristicsTree" type="preparedStatement" connection="true" return="rowCount"> <SqlMethodComment></SqlMethodComment> <Sql> <![CDATA[ insert into ad_tree(ad_tree_id, ad_client_id, ad_org_id, createdby, updatedby, name, description, treetype, isallnodes, ad_table_id) values ('899D83A7B7E24F57911A91AE82DCA496', ?, '0', '100', '100', 'Product Characteristic tree', null, 'CH', 'Y', 'E913D17C9B3847CF92235082DBE2EC44') ]]> </Sql> <Parameter name="adClientId"/> |
||
Revision | 2023-10-09 08:51 by axelmercado | ||
Description | When you want to migrate to the latest version of OB 23Q3, the Retail module script "ConvertBrandIntoCharacteristic.java" fails, because if you have 2 different customers each with their respective brands, it tries to insert 2 times the "Product Characteristic tree" showing the following error: "[java] 142138 [main] ERROR org.openbravo.retail.posterminal.modulescript.ConvertBrandIntoCharacteristicData - SQL error in query: insert into ad_tree(ad_tree_id, ad_client_id, ad_org_id, createdby, updatedby, name, description, treetype, isallnodes, ad_table_id) values ('899D83A7B7E24F57911A91AE82DCA496', ?, '0', '100', '100', 'Product Characteristic tree', null, 'CH', 'Y', 'E913D17C9B3847CF92235082DBE2EC44') :org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "ad_tree_key" [java] Detail: Key (ad_tree_id)=(899D83A7B7E24F57911A91AE82DCA496) already exists. [java] 142138 [main] ERROR org.openbravo.retail.posterminal.modulescript.ConvertBrandIntoCharacteristic - Errors converting brand into characteristic [java] 142138 [main] ERROR org.openbravo.base.ExecutionLimitBaseProcess - Error executing moduleScript org.openbravo.retail.posterminal.modulescript.ConvertBrandIntoCharacteristic: @CODE=0@ERROR: duplicate key value violates unique constraint "ad_tree_key" [java] Detail: Key (ad_tree_id)=(899D83A7B7E24F57911A91AE82DCA496) already exists. [java] javax.servlet.ServletException: @CODE=0@ERROR: duplicate key value violates unique constraint "ad_tree_key" [java] Detail: Key (ad_tree_id)=(899D83A7B7E24F57911A91AE82DCA496) already exists.". This is because the (ad_tree_id)=899D83A7B7E24F57911A91AE82DCA496) is inserted in the database for each existing customer that uses the product characteristic tree (See attached screenshots). <SqlMethod name="insertCharacteristicsTree" type="preparedStatement" connection="true" return="rowCount"> <SqlMethodComment></SqlMethodComment> <Sql> <![CDATA[ insert into ad_tree(ad_tree_id, ad_client_id, ad_org_id, createdby, updatedby, name, description, treetype, isallnodes, ad_table_id) values ('899D83A7B7E24F57911A91AE82DCA496', ?, '0', '100', '100', 'Product Characteristic tree', null, 'CH', 'Y', 'E913D17C9B3847CF92235082DBE2EC44') ]]> </Sql> <Parameter name="adClientId"/> |
Copyright © 2000 - 2009 MantisBT Group |