[jira] [Commented] (OFBIZ-5925) Pack order flow is broken

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-5925) Pack order flow is broken

Nicolas Malin (Jira)

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

Jacopo Cappellato commented on OFBIZ-5925:
------------------------------------------

Hi [~diveshdut],

in my opinion the fact that the code was trying to select a non existent field is an indication that the code was broken; my recent commit simply exposed this issue. Because of this, I think we should just fix the client code.
When fixing this or similar code we should follow two approaches:
# if the client code knows exactly the entity or view entity to which the GenericValue is associated, then it means that the field is simply wrong: remove the "get" call for the field (and all the associated logic) or refactor the code to fetch the information from another source
# if the client code receives GenericValues associated to different entities then we need to call GenericEntity.getEntityName() on it and then, based on the entity returned, select the fields that are available there

The pack order flow belongs probably to case #2, but I am not completely sure; if, on the other hand, it belongs to #1 (i.e. it always receives GenericValues of type OrderItemShipGroupAssoc) then we can simply remove the logic related to the "size" field, because it has always be null before.

What do you think?


> 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)