Details
Description
Hi Community,
We've deployed ofbiz 18.12.05 on our own server and are trying to use it without much development.
Today I tested the "New Purchase Order" function. The first steps are fine. But with the final step "Create Order", the system threw an exception saying shipment/carrier information was missing. I looked through the UI and didn't find any place to input shipment/carrier information. I think it should be a bug with the default UI.
I modified OrderServices.java and added these code as a workaround:
if (valueObj.get("carrierRoleTypeId") == null) { valueObj.set("carrierRoleTypeId", "CARRIER"); + valueObj.set("carrierPartyId", "SFEXPRESS"); + valueObj.set("shipmentMethodTypeId", "SFEXPRESS_STD"); }
SFEXPRESS is an existing carrier I added to the system earlier. This code works fine.
The debug information is attached as below.
20:57:17.387 [QUIET] [system.out] Detail: Key (shipment_method_type_id, carrier_party_id, carrier_role_type_id)=(STANDARD, _NA_, CARRIER) is not present in table "carrier_shipment_method".)) (Error while inserting: [GenericEntity:OrderItemShipGroup][carrierPartyId,_NA_(java.lang.String)][carrierRoleTypeId,CARRIER(java.lang.String)][contactMechId,10010(java.lang.String)][createdStamp,2022-04-28 20:57:17.357(java.sql.Timestamp)][createdTxStamp,2022-04-28 20:57:17.311(java.sql.Timestamp)][estimatedDeliveryDate,2022-04-28 00:00:00.0(java.sql.Timestamp)][facilityId,10000(java.lang.String)][giftMessage,null()][isGift,N(java.lang.String)][lastUpdatedStamp,2022-04-28 20:57:17.357(java.sql.Timestamp)][lastUpdatedTxStamp,2022-04-28 20:57:17.311(java.sql.Timestamp)][maySplit,N(java.lang.String)][orderId,SO2204170486(java.lang.String)][shipAfterDate,null()][shipByDate,null()][shipGroupSeqId,00001(java.lang.String)][shipmentMethodTypeId,STANDARD(java.lang.String)][shippingInstructions,null()][supplierAgreementId,null()][supplierPartyId,null()][telecomContactMechId,null()][vendorPartyId,null()] (SQL Exception while executing the following:INSERT INTO public.ORDER_ITEM_SHIP_GROUP (ORDER_ID, SHIP_GROUP_SEQ_ID, SHIPMENT_METHOD_TYPE_ID, SUPPLIER_PARTY_ID, SUPPLIER_AGREEMENT_ID, VENDOR_PARTY_ID, CARRIER_PARTY_ID, CARRIER_ROLE_TYPE_ID, FACILITY_ID, CONTACT_MECH_ID, TELECOM_CONTACT_MECH_ID, TRACKING_NUMBER, SHIPPING_INSTRUCTIONS, MAY_SPLIT, GIFT_MESSAGE, IS_GIFT, SHIP_AFTER_DATE, SHIP_BY_DATE, ESTIMATED_SHIP_DATE, ESTIMATED_DELIVERY_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: insert or update on table "order_item_ship_group" violates foreign key constraint "order_itsg_cshm" 20:57:17.413 [QUIET] [system.out] Caused by: java.lang.Exception: Current Location Stack 20:57:17.413 [QUIET] [system.out] at org.apache.ofbiz.entity.jdbc.SQLProcessor.rollback(SQLProcessor.java:185) ~[ofbiz.jar:?] 20:57:17.413 [QUIET] [system.out] at org.apache.ofbiz.entity.datasource.GenericDAO.insert(GenericDAO.java:112) ~[ofbiz.jar:?] 20:57:17.413 [QUIET] [system.out] at org.apache.ofbiz.entity.datasource.GenericHelperDAO.create(GenericHelperDAO.java:66) ~[ofbiz.jar:?] 20:57:17.413 [QUIET] [system.out] at org.apache.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:874) ~[ofbiz.jar:?] 20:57:17.413 [QUIET] [system.out] at org.apache.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1323) ~[ofbiz.jar:?] 20:57:17.413 [QUIET] [system.out] at org.apache.ofbiz.entity.GenericDelegator.storeAll(GenericDelegator.java:1279) ~[ofbiz.jar:?] 20:57:17.413 [QUIET] [system.out] at org.apache.ofbiz.order.order.OrderServices.createOrder(OrderServices.java:1035) ~[ofbiz.jar:?] 20:57:17.413 [QUIET] [system.out] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_292] 20:57:17.413 [QUIET] [system.out] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_292] 20:57:17.413 [QUIET] [system.out] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_292] 20:57:17.413 [QUIET] [system.out] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_292] 20:57:17.413 [QUIET] [system.out] at org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100) ~[ofbiz.jar:?] 20:57:17.413 [QUIET] [system.out] at org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) ~[ofbiz.jar:?] 20:57:17.413 [QUIET] [system.out] at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415) ~[ofbiz.jar:?] 20:57:17.414 [QUIET] [system.out] at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240) ~[ofbiz.jar:?] 20:57:17.414 [QUIET] [system.out] at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) ~[ofbiz.jar:?] 20:57:17.414 [QUIET] [system.out] at org.apache.ofbiz.order.shoppingcart.CheckOutHelper.createOrder(CheckOutHelper.java:613) ~[ofbiz.jar:?] 20:57:17.414 [QUIET] [system.out] at org.apache.ofbiz.order.shoppingcart.CheckOutEvents.createOrder(CheckOutEvents.java:488) ~[ofbiz.jar:?] 20:57:17.414 [QUIET] [system.out] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_292] 20:57:17.414 [QUIET] [system.out] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_292] 20:57:17.414 [QUIET] [system.out] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_292] 20:57:17.414 [QUIET] [system.out] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_292] 20:57:17.414 [QUIET] [system.out] at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:86) ~[ofbiz.jar:?] 20:57:17.414 [QUIET] [system.out] ... 39 more
I hope it is enough for devs to locate the bug. Thanks for your patience and looking forward to any comments.
James.
Attachments
Issue Links
- fixes
-
OFBIZ-6093 Create _NA_ party and STANDARD shipment method as seed data
- Closed
- is related to
-
OFBIZ-6093 Create _NA_ party and STANDARD shipment method as seed data
- Closed
- links to