Author: jleroux
Date: Sat May 12 10:36:51 2012 New Revision: 1337505 URL: http://svn.apache.org/viewvc?rev=1337505&view=rev Log: "Applied fix from trunk for revision: 1337502" ------------------------------------------------------------------------ r1337502 | jleroux | 2012-05-12 12:34:00 +0200 (sam., 12 mai 2012) | 26 lines Noted this in trunk demo log 2012-05-04 23:43:12,687 (Finalizer) [ SQLProcessor.java:836:ERROR] ---- runtime exception report -------------------------------------------------- Error closing the result, connection, etc in finalize SQLProcessor Exception: java.lang.NullPointerException Message: null ---- stack trace --------------------------------------------------------------- java.lang.NullPointerException org.apache.commons.dbcp.managed.ManagedConnection.close(ManagedConnection.java:147) org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:225) org.ofbiz.entity.jdbc.SQLProcessor.finalize(SQLProcessor.java:834) java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) java.lang.ref.Finalizer.access$100(Finalizer.java:14) java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160) -------------------------------------------------------------------------------- 2012-05-04 23:43:12,687 (Finalizer) [ EntityListIterator.java:543:ERROR] ==================================================================== EntityListIterator Not Closed for Entity [WorkEffortAndPartyAssign], caught in Finalize ==================================================================== This commit will fix it I have "organize import" set when saving. So you might notice no commented changes here and then ------------------------------------------------------------------------ Modified: ofbiz/branches/release10.04/ (props changed) ofbiz/branches/release10.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Propchange: ofbiz/branches/release10.04/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1337502 Modified: ofbiz/branches/release10.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java?rev=1337505&r1=1337504&r2=1337505&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java (original) +++ ofbiz/branches/release10.04/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java Sat May 12 10:36:51 2012 @@ -20,7 +20,6 @@ package org.ofbiz.workeffort.workeffort; import java.sql.Timestamp; -import com.ibm.icu.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.List; @@ -61,6 +60,8 @@ import org.ofbiz.service.ServiceUtil; import org.ofbiz.service.calendar.TemporalExpression; import org.ofbiz.service.calendar.TemporalExpressionWorker; +import com.ibm.icu.util.Calendar; + /** * WorkEffortServices - WorkEffort related Services */ @@ -1063,6 +1064,14 @@ public class WorkEffortServices { eli.close(); } catch (Exception e) { Debug.logError(e, "Error while closing EntityListIterator: ", module); + } finally { + if (eli != null) { + try { + eli.close(); + } catch (GenericEntityException e) { + Debug.logWarning(e, module); + } + } } } else { List<GenericValue> workEfforts = UtilGenerics.checkList(context.get("workEfforts")); |
Free forum by Nabble | Edit this page |