Notes |
|
|
Patches provided to be tested by reporter in customer's environment |
|
|
(0083202)
|
hgbot
|
2016-01-11 19:05
|
|
Repository: erp/devel/pi
Changeset: 217fb3a426febf71995fa1394dac159afa49b44f
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Dec 01 16:44:30 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/217fb3a426febf71995fa1394dac159afa49b44f [^]
Fixes issue 31580: Java Heap Space error when posting payment with many details
Add a new FIN_Utility.getOrderedPaymentDetailList method and deprecate the old one, to return a List<String> instead of a List<FIN_PaymentDetail> and avoid loading all the entities in memory.
Adapt loadLines methods in DocFINFinAccTransaction, DocFINPayment and DocFINReconciliation to the new FIN_Utility.getOrderedPaymentDetailList method.
Create a new getPaymentDetailWriteOffAndAmount method in AcctServer to adapt it to new parameters.
---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
M src/org/openbravo/erpCommon/ad_forms/AcctServer.java
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
---
|
|
|
(0083203)
|
hgbot
|
2016-01-11 19:05
|
|
Repository: erp/devel/pi
Changeset: 1817418c55aff648d979a7ca7c3d56a90ecab721
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Dec 29 11:32:34 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1817418c55aff648d979a7ca7c3d56a90ecab721 [^]
Fixed bug 31580: code review improvements
Properly passing parameter to the HQL query
Force to check client+org when using admin mode
---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
---
|
|
|
|
Code review + testing OK
Pending to be confirmed by customer |
|
|
(0083398)
|
maite
|
2016-01-19 14:00
|
|
I still obtain Java Heap Space error with changes applied. Error is obtained after 3 hours of execution for a single FIN_Payment document and using following tomcat configuration: -Xms2048M -Xmx2048M -XX:MaxPermSize=256M
I can provide environment where problem is still reproducible |
|
|
(0083575)
|
hgbot
|
2016-01-25 09:15
|
|
Repository: erp/devel/pi
Changeset: 7dafd0844a3dcfa21a67cca627e283e2ba7ba76b
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Jan 21 16:52:52 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7dafd0844a3dcfa21a67cca627e283e2ba7ba76b [^]
Related to issue 31580: Reduced Java Heap Usage even more
DocFINFinAccTransaction and DocFINPayment:
+ Avoid storing useless objects like ps and pd, and replaced by String Ids, so we can safely clear the Hibernate session
+ Save cInvoiceId when loading lines in field provider so it's available latter on when loading the document lines, thus we avoid an extra query to the database to get the invoice from the payment detail
+ Forces a session clear every 100 records when working with the payment details. This is only possible because DAL objects are not stored anywhere.
DocLine_FINFinAccTransaction and DocLine_FINPayment:
+ Declare a String invoiceId parameter instead of using an Invoice object. This improves the memory consumption and allows to manage external session clears when required.
+ Declare as deprecated all the methods that used the invoice object and adapt the getInvoice() to be backward compatible (returns the invoice object is previously declared in the object, or a new object based on the invoiceId)
+ For DocLine_FINPayment only, adapted the Order object usage following the same logic.
FIN_Utility.getOrderedPaymentDetailList() query uses an inner join to the FPSD because having a linked FPSD is a requirement in the accounting classes.
Note that DocFINReconciliation class should be also adapted following the same logics described above. However, this class would require deeper refactor mainly because of the attribute Set<FIN_FinaccTransaction> transactionsToBePosted, that avoids safely session clears.
---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
M src/org/openbravo/erpCommon/ad_forms/DocLine_FINFinAccTransaction.java
M src/org/openbravo/erpCommon/ad_forms/DocLine_FINPayment.java
---
|
|
|
|
With the last changeset the memory consumption is reduced around 1.5GB.
See attached with_last_fix_after_reopening_issue_post_payment_and_transaction.png for details |
|
|
|
|
|
|
|
|
|
|