[jira] Created: (OFBIZ-4105) findOrdersToPickMove: EntityListIterator not closed if no Picklist generated

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

[jira] Created: (OFBIZ-4105) findOrdersToPickMove: EntityListIterator not closed if no Picklist generated

Nicolas Malin (Jira)
findOrdersToPickMove: EntityListIterator not closed if no Picklist generated
----------------------------------------------------------------------------

                 Key: OFBIZ-4105
                 URL: https://issues.apache.org/jira/browse/OFBIZ-4105
             Project: OFBiz
          Issue Type: Bug
          Components: order
    Affects Versions: SVN trunk
            Reporter: Paul Foxworthy
            Priority: Minor
             Fix For: SVN trunk


Got to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
Click on Prink Pick Sheet
You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.

The problem is in

applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.

After the entity-conditon is created, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.

My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the else element so the condition is evaluated and the iterator created only when the iterator will be used.

I'm not 100% sure this is the best fix and would appreciate some feedback.



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-4105) findOrdersToPickMove: EntityListIterator not closed if no Picklist generated

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Foxworthy updated OFBIZ-4105:
----------------------------------

    Attachment: OFBIZ-4105_iterator_not_closed.patch

> findOrdersToPickMove: EntityListIterator not closed if no Picklist generated
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-4105
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4105
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Paul Foxworthy
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4105_iterator_not_closed.patch
>
>
> Got to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
> Click on Prink Pick Sheet
> You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
> Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.
> The problem is in
> applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
> There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.
> After the entity-conditon is created, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.
> My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the else element so the condition is evaluated and the iterator created only when the iterator will be used.
> I'm not 100% sure this is the best fix and would appreciate some feedback.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-4105) findOrdersToPickMove: EntityListIterator not closed if no Picklist generated

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Foxworthy updated OFBIZ-4105:
----------------------------------

    Description:
Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
Click on Prink Pick Sheet
You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.

The problem is in

applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.

After the entity-conditon is created, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.

My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.

I'm not 100% sure this is the best fix and would appreciate some feedback.



  was:
Got to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
Click on Prink Pick Sheet
You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.

The problem is in

applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.

After the entity-conditon is created, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.

My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the else element so the condition is evaluated and the iterator created only when the iterator will be used.

I'm not 100% sure this is the best fix and would appreciate some feedback.




> findOrdersToPickMove: EntityListIterator not closed if no Picklist generated
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-4105
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4105
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Paul Foxworthy
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4105_iterator_not_closed.patch
>
>
> Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
> Click on Prink Pick Sheet
> You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
> Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.
> The problem is in
> applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
> There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.
> After the entity-conditon is created, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.
> My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.
> I'm not 100% sure this is the best fix and would appreciate some feedback.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-4105) findOrdersToPickMove: EntityListIterator not closed if no Picklist generated

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Foxworthy updated OFBIZ-4105:
----------------------------------

    Description:
Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
Click on Prink Pick Sheet
You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.

The problem is in

applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.

After the entity-condition element, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.

My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.

I'm not 100% sure this is the best fix and would appreciate some feedback.



  was:
Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
Click on Prink Pick Sheet
You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.

The problem is in

applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.

After the entity-conditon is created, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.

My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.

I'm not 100% sure this is the best fix and would appreciate some feedback.




> findOrdersToPickMove: EntityListIterator not closed if no Picklist generated
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-4105
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4105
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Paul Foxworthy
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4105_iterator_not_closed.patch
>
>
> Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
> Click on Prink Pick Sheet
> You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
> Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.
> The problem is in
> applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
> There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.
> After the entity-condition element, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.
> My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.
> I'm not 100% sure this is the best fix and would appreciate some feedback.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-4105) findOrdersToPickMove: EntityListIterator not closed if no Picklist generated

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Foxworthy updated OFBIZ-4105:
----------------------------------

    Description:
Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
Click on Prink Pick Sheet
You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.

The problem is in the findOrdersToPickMove simple method in
applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml .

There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.

After the entity-condition element, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.

My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.

I'm not 100% sure this is the best fix and would appreciate some feedback.



  was:
Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
Click on Prink Pick Sheet
You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.

The problem is in

applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.

After the entity-condition element, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.

My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.

I'm not 100% sure this is the best fix and would appreciate some feedback.




> findOrdersToPickMove: EntityListIterator not closed if no Picklist generated
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-4105
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4105
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Paul Foxworthy
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4105_iterator_not_closed.patch
>
>
> Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
> Click on Prink Pick Sheet
> You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
> Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.
> The problem is in the findOrdersToPickMove simple method in
> applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml .
> There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.
> After the entity-condition element, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.
> My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.
> I'm not 100% sure this is the best fix and would appreciate some feedback.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-4105) findOrdersToPickMove: EntityListIterator not closed if no Picklist generated

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-4105.
----------------------------------

    Resolution: Fixed
      Assignee: Jacques Le Roux

Thanks Paul,

Good catch, your solution makes totally sense to me. I wonder why the use-iterator tag was not right begore the iterate tag. Maybe some move in the code between the creation an now...

Your patch is in trunk at r1057519, R10.04 at r1057519, R9.04 at r1057532  

PS: while merging (by hand) in R9.04 I found the reason: the iterate block was moved since then, but the use-iterator block was left there


> findOrdersToPickMove: EntityListIterator not closed if no Picklist generated
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-4105
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4105
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Paul Foxworthy
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4105_iterator_not_closed.patch
>
>
> Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
> Click on Prink Pick Sheet
> You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
> Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.
> The problem is in the findOrdersToPickMove simple method in
> applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml .
> There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.
> After the entity-condition element, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.
> My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.
> I'm not 100% sure this is the best fix and would appreciate some feedback.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4105) findOrdersToPickMove: EntityListIterator not closed if no Picklist generated

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-4105:
----------------------------------------

I reverted from R9.04, there was an error and I have not enough time to do it properly by hand.
               

> findOrdersToPickMove: EntityListIterator not closed if no Picklist generated
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-4105
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4105
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Paul Foxworthy
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4105_iterator_not_closed.patch
>
>
> Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
> Click on Prink Pick Sheet
> You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
> Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.
> The problem is in the findOrdersToPickMove simple method in
> applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml .
> There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.
> After the entity-condition element, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.
> My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.
> I'm not 100% sure this is the best fix and would appreciate some feedback.

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

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Comment Edited] (OFBIZ-4105) findOrdersToPickMove: EntityListIterator not closed if no Picklist generated

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux edited comment on OFBIZ-4105 at 8/5/12 2:04 PM:
----------------------------------------------------------------

At r1369592, I reverted from R9.04, there was an error and I have not enough time to do it properly by hand.
               
      was (Author: jacques.le.roux):
    I reverted from R9.04, there was an error and I have not enough time to do it properly by hand.
                 

> findOrdersToPickMove: EntityListIterator not closed if no Picklist generated
> ----------------------------------------------------------------------------
>
>                 Key: OFBIZ-4105
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4105
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Paul Foxworthy
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4105_iterator_not_closed.patch
>
>
> Go to ordermgr/control/orderview for an order that doesn't have stock ready for picking.
> Click on Prink Pick Sheet
> You'll get a Pick Sheet PDF with the message "Order not ready for picking, needs stock move"
> Look at logs, you'll see an EntityListIterator was created and never closed, so a warning message was logged when the finalize was executed.
> The problem is in the findOrdersToPickMove simple method in
> applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml .
> There's a <use-iterator/> for the OrderHeaderAndItemFacilityLocation entity.
> After the entity-condition element, there's an <if> element, and the iterator is only used when the "if" condition is false, i.e. the <else> part is executed.
> My fix is simply to move the <entity-condition>, complete with <use-iterator>, within the <else> element so the condition is evaluated and the iterator created only when the iterator will be used.
> I'm not 100% sure this is the best fix and would appreciate some feedback.

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