Hi,

This is a complete functional newbie question about products as services.

I want to create a product as a service (that is, in Product tab I have set
"Require Inventory" to N and "Product Type" to service).

But whenever I set-up an order with a single line item of this product and
go to Create Order I keep getting the following error message on screen:

The Following Errors Occurred:
Did not complete the order, the following occurred:The product with ID
PANEL-ENTRY-100 is no longer in stock. Please try reducing the quantity or
removing the product from this order.

Any idea is to what I'm doing wrong here?

In the logs I see the following exceptions:

2015-09-15 16:23:50,761 |-0.0.0.0-8443-exec-6
|ServiceDispatcher             |E| Incoming context (in runSync :
reserveProductInventoryByFacility) does not match expected requirements
org.ofbiz.service.ServiceValidationException: The following required
parameter is missing: [reserveProductInventoryByFacility.facilityId]
    at org.ofbiz.service.ModelService.validate(ModelService.java:551)
~[ofbiz-service.jar:?]
    at
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:381)
[ofbiz-service.jar:?]
    at
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:232)
[ofbiz-service.jar:?]
    at
org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:98)
[ofbiz-service.jar:?]
...
015-09-15 16:23:50,773 |-0.0.0.0-8443-exec-6 |ServiceDispatcher
|T| [[Sync service failed...- total:0.0,since last(Begin):0.0]] - 'order /
reserveProductInventoryByFacility'
2015-09-15 16:23:50,773 |-0.0.0.0-8443-exec-6
|TransactionUtil               |W| [TransactionUtil.setRollbackOnly]
Calling transaction setRollbackOnly; this stack trace shows where this is
happening:
java.lang.Exception: Service [reserveProductInventoryByFacility] threw an
unexpected exception/error
    at
org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:378)
[ofbiz-entity-test.jar:?]
    at
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:319)
[ofbiz-entity-test.jar:?]
    at
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:517)
[ofbiz-service.jar:?]
...
2015-09-15 16:23:50,782 |-0.0.0.0-8443-exec-6
|CallService                   |E| ERROR: Could not complete the Reserve
Store Inventory
[file:/usr/local/share/apache-ofbiz-13.07.02/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml#reserveStoreInventory]
process [problem invoking the [reserveProductInventoryByFacility] service
with the map named [callServiceMap] containing [{orderItemSeqId=00001,
locale=en, shipGroupSeqId=00001, quantity=1.00,
userLogin=[GenericEntity:UserLogin][createdStamp,2015-08-26
16:25:53.0(java.sql.Timestamp)][createdTxStamp,2015-08-26
16:25:53.0(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang.String)][disabledDateTime,null()][enabled,Y(java.lang.String)][externalAuthId,null()][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,null()][lastUpdatedStamp,2015-09-10
20:15:14.0(java.sql.Timestamp)][lastUpdatedTxStamp,2015-09-10
20:15:14.0(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,null()][userLdapDn,null()][userLoginId,admin(java.lang.String)],
facilityId=null, requireInventory=N, orderId=10010,
productId=PANEL-ENTRY-100}]: The following required parameter is missing:
[reserveProductInventoryByFacility.facilityId]]
org.ofbiz.service.ServiceValidationException: The following required
parameter is missing: [reserveProductInventoryByFacility.facilityId]
    at org.ofbiz.service.ModelService.validate(ModelService.java:551)
~[ofbiz-service.jar:?]
    at
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:381)
~[ofbiz-service.jar:?]
...
2015-09-15 16:23:50,797 |-0.0.0.0-8443-exec-6
|TransactionUtil               |I| [TransactionUtil.rollback] transaction
rolled back
2015-09-15 16:23:50,797 |-0.0.0.0-8443-exec-6
|ServiceDispatcher             |T| Sync service [order/storeOrder] finished
in [225] milliseconds
2015-09-15 16:23:50,798 |-0.0.0.0-8443-exec-6
|RequestHandler                |I| Ran Event
[java:org.ofbiz.order.shoppingcart.CheckOutEvents#createOrder] from
[request], result is [error]
2015-09-15 16:23:50,798 |-0.0.0.0-8443-exec-6
|RequestHandler                |E| Request processorder caused an error
with the following message: Did not complete the order, the following
occurred:The product  with ID PANEL-ENTRY-100 is no longer in stock. Please
try reducing the quantity or removing the product from this order.


Thanks in advance for your assistance.

Best regards,
Morten Jensen

Reply via email to