Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9286

ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: Upcoming Release, 16.11.03
    • Component/s: order
    • Labels:
      None

      Description

      Here is the stack error:

      017-03-27 07:57:53,968 |OFBiz-JobQueue-1     |PersistedServiceJob           |I| Job  [Run Auto-Reorders] Id [11226] -- Next runtime: Tue Mar 28 00:00:00 CEST 2017
      017-03-27 07:57:53,968 |OFBiz-JobQueue-1     |GenericDelegator              |E| ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.
      ava.lang.Exception: Stack Trace
            at org.apache.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1533) [ofbiz.jar:?]
          at org.apache.ofbiz.entity.util.EntityQuery.queryIterator(EntityQuery.java:394) [ofbiz.jar:?]
       at org.apache.ofbiz.order.shoppinglist.ShoppingListServices.createListReorders(ShoppingListServices.java:133) [ofbiz.jar:?]
      [...]
      017-03-27 07:57:53,993 |OFBiz-JobQueue-0     |ServiceDispatcher             |T| Sync service [default/cancelAllBackOrders] finished in [230] milliseconds
      017-03-27 07:57:54,001 |OFBiz-JobQueue-0     |PersistedServiceJob           |I| Job  [Extend expired Subscriptions] Id [11225] -- Next runtime: Tue Mar 28 00:00:00 CEST 2017
      017-03-27 07:57:54,002 |OFBiz-JobQueue-0     |GenericDelegator              |E| ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.
      ava.lang.Exception: Stack Trace
            at org.apache.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1533) [ofbiz.jar:?]
          at org.apache.ofbiz.entity.util.EntityQuery.queryIterator(EntityQuery.java:394) [ofbiz.jar:?]
       at org.apache.ofbiz.order.order.OrderServices.runSubscriptionAutoReorders(OrderServices.java:5564) [ofbiz.jar:?]
       [...]
      

        Activity

        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Fixed at r1789045

        Show
        jacques.le.roux Jacques Le Roux added a comment - Fixed at r1789045
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Reopening, since then I forgot this type of issue (you must begin the transaction before the try-with-resources) and reintroduced other cases while working on OFBIZ-9385.

        I also thought I did not have to backport r1789045 and Daniel Coric reported the same issue on user ML for R16.11, this was fixed with r1798179

        At r1798353 I fixed the same bug introduced with OFBIZ-9385 for SurveyWrapper and ProductEvents class. I very seriously checked there are not other cases left and learned the Meaning of (?s) in regex while doing so.

        Lesson learned!

        Show
        jacques.le.roux Jacques Le Roux added a comment - Reopening, since then I forgot this type of issue (you must begin the transaction before the try-with-resources) and reintroduced other cases while working on OFBIZ-9385 . I also thought I did not have to backport r1789045 and Daniel Coric reported the same issue on user ML for R16.11, this was fixed with r1798179 At r1798353 I fixed the same bug introduced with OFBIZ-9385 for SurveyWrapper and ProductEvents class. I very seriously checked there are not other cases left and learned the Meaning of (?s) in regex while doing so. Lesson learned!
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        All is OK now closing (I put 16.11.03 in fix versions because of r1798353, pfew!)

        Show
        jacques.le.roux Jacques Le Roux added a comment - All is OK now closing (I put 16.11.03 in fix versions because of r1798353, pfew!)

          People

          • Assignee:
            jacques.le.roux Jacques Le Roux
            Reporter:
            jacques.le.roux Jacques Le Roux
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development