You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (Commented) (JIRA)" <ji...@apache.org> on 2012/01/12 20:21:40 UTC
[jira] [Commented] (OFBIZ-4657) ArrayIndexOutOfBoundsException in
OrderServices.xml:updateOrderItemShipGroup
[ https://issues.apache.org/jira/browse/OFBIZ-4657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185165#comment-13185165 ]
Jacques Le Roux commented on OFBIZ-4657:
----------------------------------------
This sounds to be related to OFBIZ-4389, I will have a look...
> ArrayIndexOutOfBoundsException in OrderServices.xml:updateOrderItemShipGroup
> ----------------------------------------------------------------------------
>
> Key: OFBIZ-4657
> URL: https://issues.apache.org/jira/browse/OFBIZ-4657
> Project: OFBiz
> Issue Type: Bug
> Components: order
> Affects Versions: SVN trunk
> Reporter: Alexander Reelsen
>
> When changing the billing or shipping address of a sales order in the ordermgr, a bsh exception is logged - with absolutely no trace where it is coming from. And the change of the adress is successful as well.
> The exception occurs here in OrderServices.xml in updateOrderItemShipGroup() in the BSH script
> <call-bsh><![CDATA[
> shipmentMethod = parameters.get("shipmentMethod");
> if (shipmentMethod != null) {
> arr = shipmentMethod.split( "@" );
> parameters.put("shipmentMethodTypeId", arr[0]);
> parameters.put("carrierPartyId", arr[1]);
> parameters.put("carrierRoleTypeId", arr[2]);
> }
> ]]></call-bsh>
> Splitting for not existing chars and assuming the array was split successfully leads to the exception. The fix could work liks this, but as I do not have a clue at all, why it is split by the at-sign anyway I dont know if this fix does what it should. For us it does, because we do not care for sales order ship groups.
> <call-bsh><![CDATA[
> shipmentMethod = parameters.get("shipmentMethod");
> if (shipmentMethod != null) {
> arr = shipmentMethod.split( "@" );
> if (arr.length >= 3) {
> parameters.put("shipmentMethodTypeId", arr[0]);
> parameters.put("carrierPartyId", arr[1]);
> parameters.put("carrierRoleTypeId", arr[2]);
> }
> }
> ]]></call-bsh>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira