You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Jacques Le Roux (Jira)" <ji...@apache.org> on 2025/02/18 10:00:02 UTC

[jira] [Updated] (OFBIZ-13211) OFBiz Setup failing to setup the product store

     [ https://issues.apache.org/jira/browse/OFBIZ-13211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux updated OFBIZ-13211:
------------------------------------
    Summary: OFBiz Setup failing to setup the product store  (was: Ofbiz Setup failing to setup the product store)

> OFBiz Setup failing to setup the product store
> ----------------------------------------------
>
>                 Key: OFBIZ-13211
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13211
>             Project: OFBiz
>          Issue Type: Bug
>          Components: setup
>    Affects Versions: Upcoming Branch, 24.09
>            Reporter: Carlos Guzman
>            Assignee: Jacques Le Roux
>            Priority: Major
>         Attachments: OFBIZ-13211.patch
>
>
> In a clean installation, the Product Store screen in Ofbiz Setup fails to update with the following error:
> {code:java}
> ofbiz24  | Caused by: org.apache.ofbiz.entity.GenericDataSourceException: SQL Exception while executing the following:INSERT INTO public.PRODUCT_STORE_SHIPMENT_METH (PRODUCT_STORE_SHIP_METH_ID, PRODUCT_STORE_ID, SHIPMENT_METHOD_TYPE_ID, PARTY_ID, ROLE_TYPE_ID, COMPANY_PARTY_ID, MIN_WEIGHT, MAX_WEIG
> HT, MIN_SIZE, MAX_SIZE, MIN_TOTAL, MAX_TOTAL, ALLOW_USPS_ADDR, REQUIRE_USPS_ADDR, ALLOW_COMPANY_ADDR, REQUIRE_COMPANY_ADDR, INCLUDE_NO_CHARGE_ITEMS, INCLUDE_FEATURE_GROUP, EXCLUDE_FEATURE_GROUP, INCLUDE_GEO_ID, EXCLUDE_GEO_ID, SERVICE_NAME, CONFIG_PROPS, SHIPMENT_CUSTOM_METHOD_ID, SHIPMENT_GATEWAY_
> CONFIG_ID, SEQUENCE_NUMBER, ALLOWANCE_PERCENT, MINIMUM_PRICE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: insert or update on table "product_store_shipment
> _meth" violates foreign key constraint "shipmentmethodtype" 
> ofbiz24  |   Detail: Key (shipment_method_type_id)=(NO_SHIPPING) is not present in table "shipment_method_type".) 
> ofbiz24  |      at org.apache.ofbiz.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:445) ~[ofbiz.jar:?] 
> ofbiz24  |      at org.apache.ofbiz.entity.datasource.GenericDAO.singleInsert(GenericDAO.java:178) ~[ofbiz.jar:?] 
> ofbiz24  |      at org.apache.ofbiz.entity.datasource.GenericDAO.insert(GenericDAO.java:115) ~[ofbiz.jar:?] 
> ofbiz24  |      at org.apache.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java:68) ~[ofbiz.jar:?] 
> ofbiz24  |      at org.apache.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:897) ~[ofbiz.jar:?] 
> ofbiz24  |      at org.apache.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1357) ~[ofbiz.jar:?] 
> ofbiz24  |      ... 70 more 
> ofbiz24  | Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "product_store_shipment_meth" violates foreign key constraint "shipmentmethodtype" 
> ofbiz24  |   Detail: Key (shipment_method_type_id)=(NO_SHIPPING) is not present in table "shipment_method_type".{code}
>  
> Issue is present in trunk and 24.09 branch. (working in stable branch).
>  
> The method createProductStoreWithDefaultSetting is expecting the table ShipmentMethodType to be empty to insert the seed data from OfbizSetupShippingData.xml.
> But because OFBIZ-12608 introduced new seed data that inserts one record in ShipmentMethodType, the condition expecting the table to be empty is not met anymore and then the shipping data is not initialized.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)