On 05/27/2012 03:28 PM, [email protected] wrote:
Author: jleroux
Date: Sun May 27 20:28:16 2012
New Revision: 1343088

URL: http://svn.apache.org/viewvc?rev=1343088&view=rev
Log:
Fixes this error found by chance in log

---- exception report ----------------------------------------------------------
ERROR: Cannot do a find that returns an EntityListIterator with no transaction 
in place. Wrap this call in a transaction.
Exception: java.lang.Exception
Message: Stack Trace
---- stack trace ---------------------------------------------------------------
java.lang.Exception: Stack Trace
org.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1751)
org.ofbiz.order.order.OrderServices$1.call(OrderServices.java:5610)
org.ofbiz.order.order.OrderServices$1.call(OrderServices.java:5605)

Modified:
     ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1343088&r1=1343087&r2=1343088&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java 
(original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java 
Sun May 27 20:28:16 2012
@@ -5601,7 +5601,9 @@ public class OrderServices {
          }
          final EntityCondition cond = 
EntityCondition.makeCondition(orderCondList);
          List<String>  orderIds;
+        boolean beganTransaction = false;
          try {
+            beganTransaction = TransactionUtil.begin();
              orderIds = TransactionUtil.doNewTransaction(new 
Callable<List<String>>() {
                  public List<String>  call() throws Exception {
                      List<String>  orderIds = new LinkedList<String>();

Er, really? This is not the correct fix. Do you see that TransactionUtil.doNewTransaction call? Do you understand what that does(or what it is supposed to do)?

The real problem is in TransactionUtil.doNewTransaction, and it's my fault.

I fixed the root cause in 1343469, then backed out your change in 1343470.

Reply via email to