ATG Rest full API addItemToOrder 不工作

ATG Rest full API addItemToOrder is not working

我正在使用 ATG Web-commerce REST Full API,addItemToOrder 不工作。 这是错误:

{
  "formError": true,
  "formExceptions": [
    {
      "localizedMessage": "Unable to process the request currently. Please try again after some time",
      "errorCode": "atg.droplet.DropletException"
    }
  ],
  "concurrentUpdate": false
}

http://IP:Port/rest/model/atg/commerce/order/purchase/CartModifierActor/addItemToOrder

I have checked the server log file, Null pointer exception is showing.

/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-143/atg/commerce/order/purchase/CartModifierFormHandler   ---     java.lang.NullPointerException
**** Error      /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-143/atg/commerce/order/purchase/CartModifierFormHandler           at atg.siebel.catalog.SiebelCatalogTools.updateQuoteWithProfileDetails(SiebelCatalogTools.java:3681)
  /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-143/atg/commerce/order/purchase/CartModifierFormHandler           at atg.siebel.catalog.SiebelCatalogTools.checkProductEligibility(SiebelCatalogTools.java:3384)
  /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-143/atg/commerce/order/purchase/CartModifierFormHandler           at atg.siebel.validation.SiebelValidator.validateProductEligibility(SiebelValidator.java:141)
  /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-143/atg/commerce/order/purchase/CartModifierFormHandler           at atg.siebel.order.purchase.SiebelCartModifierFormHandler.preAddItemToOrder(SiebelCartModifierFormHandler.java:569)
  /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-143/atg/commerce/order/purchase/CartModifierFormHandler           at atg.commerce.order.purchase.CartModifierFormHandler.handleAddItemToOrder(CartModifierFormHandler.java:3035)
  /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-143/atg/commerce/order/purchase/CartModifierFormHandler           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-143/atg/commerce/order/purchase/CartModifierFormHandler           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-143/atg/commerce/order/purchase/CartModifierFormHandler           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-143/atg/commerce/order/purchase/CartModifierFormHandler           at java.lang.reflect.Method.in

(这里多行错误Unable to post), 会不会是因为产品同步问题?还是 sku 的问题..?

请帮忙

仍然有点难以准确找出错误所在,但考虑到您正在调用 updateQuoteWithProfileDetails(Quote,RepositoryItem) 方法,并且在调用方法中有一个 null 检查 RepositoryItem(配置文件)并且 Quotenew,那么调用代码中唯一可能以 NullPointerException 结尾的行是:

parentOrganizationOfProfile = (RepositoryItem) profile.getPropertyValue(getProfilePropertyParentOrganization());

这意味着 profile RepositoryItem 上的 ProfileParentOrganisation 值是 null.

该方法中的其余代码(根据 ATG 在参考应用程序中提供的来源)都提供 null 检查。