我正在研究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休息/模型/atg/商务/订单/采购/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的问题?
请帮
仍然有点难以确定错误的确切位置,但考虑到您正在调用updateQuoteWithProfileDetails(Quote,RepositoryItem)
方法,并且在调用方法中对RepositoryItem
(配置文件)有null
检查,Quote
是new
,那么在调用代码中可能最终与NullPointerException
的唯一行是:
parentOrganizationOfProfile = (RepositoryItem) profile.getPropertyValue(getProfilePropertyParentOrganization());
表示profile
RepositoryItem
上的ProfileParentOrganisation
值为null
。
该方法中的其余代码(根据参考应用程序中ATG提供的源代码)都提供了null
检查。