0

我正在研究 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

我检查了服务器日志文件,显示空指针异常。

/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

(这里有更多的错误无法发布),会不会是因为产品同步问题?还是sku的问题..?

请帮忙

4

1 回答 1

0

仍然有点难以确定错误的确切位置,但考虑到您正在调用该updateQuoteWithProfileDetails(Quote,RepositoryItem)方法并且在调用方法中null检查了RepositoryItem(profile) 和Quoteis new,那么唯一可能NullPointerException在调用中以 a 结尾的行代码是:

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

这意味着上的ProfileParentOrganisation值为。profile RepositoryItemnull

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

于 2016-07-06T12:24:51.010 回答