[ 
https://issues.apache.org/jira/browse/OFBIZ-5925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14261031#comment-14261031
 ] 

Divesh Dutta commented on OFBIZ-5925:
-------------------------------------

I researched the code and tried to find out places from where  
calcShipmentCostEstimate is called . Also I saw that calcShipmentCostEstimate 
service have support of estimating shipping charge based on size or feature of 
product. So code which is calling calcShipmentCostEstimate service can send  
map of shippableItemInfo which is having featureSet and size as key. So, its 
not necessary that shippableItemInfo will always have list of 
OrderItemShipGroupAssoc. If you remove code to get size and featureSet then 
from shippableItemInfo then you will be removing capability of estimating 
shipment cost based on size and feature of Product. At some places code 
prepares shippableItemInfo using getShippableItemInfo method of 
OrderReadHelper. getShippableItemInfo calls getItemInfoMap method which puts 
size and featureSet. 

So as Deepak mentioned, this flow belongs to #2. 

Now to fix this particular case, either you do (it.containsKey()) OR 
(!"OrderItemShipGroupAssoc".equals(currentValue.getEntityName())) . But in 
future if map is prepared using some other entity then code will fail again for 
with later solution. So IMO, (it.containsKey()) is better fix. Please let me 
know your opinion and then I will get this issue fixed accordingly 


> Pack order flow is broken
> -------------------------
>
>                 Key: OFBIZ-5925
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5925
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>            Reporter: Deepak Dixit
>            Priority: Blocker
>
> Pack order flow is broken, its throwing error
> {code}
>      [java] org.ofbiz.widget.screen.ScreenRenderException: Error rendering 
> screen [component://product/widget/facility/ShipmentScreens.xml#PackOrder]: 
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen 
> [component://product/widget/facility/CommonScreens.xml#main-decorator]: 
> org.ofbiz.entity.transaction.GenericTransactionException: The current 
> transaction is marked for rollback, not beginning a new transaction and 
> aborting current operation; the rollbackOnly was caused by: Service 
> [calcShipmentCostEstimate] threw an unexpected 
> exception/errororg.ofbiz.service.GenericServiceException: Service 
> [calcShipmentCostEstimate] target threw an unexpected exception (The field 
> name (or key) [size] is not valid for entity [OrderItemAndShipGroupAssoc].) 
> (Service [calcShipmentCostEstimate] target threw an unexpected exception (The 
> field name (or key) [size] is not valid for entity 
> [OrderItemAndShipGroupAssoc].)) (The current transaction is marked for 
> rollback, not beginning a new transaction and aborting current operation; the 
> rollbackOnly was caused by: Service [calcShipmentCostEstimate] threw an 
> unexpected exception/errororg.ofbiz.service.GenericServiceException: Service 
> [calcShipmentCostEstimate] target threw an unexpected exception (The field 
> name (or key) [size] is not valid for entity [OrderItemAndShipGroupAssoc].) 
> (Service [calcShipmentCostEstimate] target threw an unexpected exception (The 
> field name (or key) [size] is not valid for entity 
> [OrderItemAndShipGroupAssoc].))) (Error rendering screen 
> [component://product/widget/facility/CommonScreens.xml#main-decorator]: 
> org.ofbiz.entity.transaction.GenericTransactionException: The current 
> transaction is marked for rollback, not beginning a new transaction and 
> aborting current operation; the rollbackOnly was caused by: Service 
> [calcShipmentCostEstimate] threw an unexpected 
> exception/errororg.ofbiz.service.GenericServiceException: Service 
> [calcShipmentCostEstimate] target threw an unexpected exception (The field 
> name (or key) [size] is not valid for entity [OrderItemAndShipGroupAssoc].) 
> (Service [calcShipmentCostEstimate] target threw an unexpected exception (The 
> field name (or key) [size] is not valid for entity 
> [OrderItemAndShipGroupAssoc].)) (The current transaction is marked for 
> rollback, not beginning a new transaction and aborting current operation; the 
> rollbackOnly was caused by: Service [calcShipmentCostEstimate] threw an 
> unexpected exception/errororg.ofbiz.service.GenericServiceException: Service 
> [calcShipmentCostEstimate] target threw an unexpected exception (The field 
> name (or key) [size] is not valid for entity [OrderItemAndShipGroupAssoc].) 
> (Service [calcShipmentCostEstimate] target threw an unexpected exception (The 
> field name (or key) [size] is not valid for entity 
> [OrderItemAndShipGroupAssoc].))))
> {code}
> This error occured due to recent fix in GenericEntity.get(). Need to fix the 
> pack order flow.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to