ATG Rest完整API addItemToOrder不起作用 [英] ATG Rest full API addItemToOrder is not working

查看:105
本文介绍了ATG Rest完整API addItemToOrder不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ATG Web电子商务REST Full API,addItemToOrder不起作用. 这是错误:

I am working on ATG Web-commerce REST Full API, addItemToOrder is not working. This is the Error:

{
  "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

我已经检查了服务器日志文件,显示了Null指针异常.

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

(有更多错误行无法在此处发布), 是否会因为产品同步问题?还是sku的问题.?

(there are more lines of error Unable to post here), Would it be because of product sync issue? or sku's issue..?

请帮助

推荐答案

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

Still a bit difficult to work out exactly where the error is but considering that you are calling the updateQuoteWithProfileDetails(Quote,RepositoryItem) method and in the calling method there is a null check on the RepositoryItem (profile) and Quote is new, then the only line that could end up with a NullPointerException in the calling code is:

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

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

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

The rest of the code in that method (according to the source provided by ATG in the reference application) all provide null checks.

这篇关于ATG Rest完整API addItemToOrder不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆