[ https://issues.apache.org/jira/browse/OFBIZ-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14349700#comment-14349700 ]
Wai edited comment on OFBIZ-5949 at 3/6/15 7:12 AM: ---------------------------------------------------- There are 2 changes in this patch. Modification#1: An enhancement to use FlexibleStringExpander as a means to modify the placeholders in applications/commonext/data/GlAccountData.xml. replacing all occurrence of ORGPARTYID with ${orgPartyId} replacing all occurrence of PRODUCTSTOREID with ${productStoreId} This change alone constitutes the large patch file size. Modification#2: When creating the product store in ofbizsetup, a foreign key violation was encountered. I narrowed it down to line#69 of applications/commonext/data/ProductStoreData.xml. ShipmentCostEstimate.shipmentMethodTypeId=NEXT_DAY refers to an entry in ShipmentMethodType that does not exist. Hence, the foreign key violation. I simply modified the entry's ShipmentCostEstimate.shipmentMethodTypeId from NEXT_DAY (which does not exist) to NEXT_DAY_AIR (which does) to resolve the foreign key violation. As mentioned in the previous comment, I do not know if this change in the data is sensical, and I ask the community to offer some insight. was (Author: wt): There are 2 changes in this patch. Modification#1: An enhancement to use FlexibleStringExpander as a means to modify the placeholders in applications/commonext/data/GlAccountData.xml. replacing all occurrence of ORGPARTYID with ${orgPartyId} replacing all occurrence of PRODUCTSTOREID with ${productStoreId} This change alone constitutes the large patch file size. Modification#2: When creating the product store in ofbizsetup, a foreign key violation was encountered. I narrowed it down to line#69 of applications/commonext/data/ProductStoreData.xml. ShipmentCostEstimate.shipmentMethodTypeId=NEXT_DAY refers to an entry in ShipmentMethodType that does not exist. Hence, the foreign key violation. I simply modified the entry's ShipmentCostEstimate.shipmentMethodTypeId from NEXT_DAY (which does not exist) to NEXT_DAY_AIR (which does) to resolve the foreign key violation. As mentioned in the previous comment, I do not know if this change in the data is sensical, and I ask the community to offer some insight. You can make this change to the data, or you can add an entry in ShipmentMethodType with a primary key of NEXT_DAY. > ofbizsetup create product store cause exception, remove use of temp file to > load entity data > -------------------------------------------------------------------------------------------- > > Key: OFBIZ-5949 > URL: https://issues.apache.org/jira/browse/OFBIZ-5949 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Trunk > Reporter: Wai > Assignee: Jacques Le Roux > Attachments: OFBIZ-5949.patch > > > The exception is caused by foreign key constraint violation between > ShipmentCostEstimate and CarrierShipmentMethod entities. > Currently, when creating a new product store using ofbizsetup component > default data associated with the product store is loaded into the database > using the following steps. > 1. read default data from entity xml file and replace specific items in the > read data and write to temp file. > 2. use service=parseEntityXmlFile to load the processed file into database. > The issue with this method is that the temp file can present a problem when > ofbiz is operating in multitenant mode. > The solution is to modify the relevant services so that no temp file needs > generated. -- This message was sent by Atlassian JIRA (v6.3.4#6332)