Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0054168Openbravo ERPA. Platformpublic2023-12-19 18:062024-03-18 16:36
malsasua 
caristu 
highmajoralways
closedfixed 
5
 
 
alostale
Core
No
0054168: module org.openbravo.mobile.core.transformjrxmltopdf/ should be adapted to jasper cache
In the issue https://issues.openbravo.com/view.php?id=37741 [^] was implemented a functionality to cache the jasper files.

the module org.openbravo.mobile.core.transformjrxmltopdf is not using this jasper cache and it could cause memory problems:

https://gitlab.com/openbravo/customers/SHARED/org.openbravo.mobile.core.transformjrxmltopdf/-/blob/master/src/org/openbravo/mobile/core/transformjrxmltopdf/JasperParser.java#L294 [^]

SHU notes about this topic:

We 'discovered' that repeated compilation + classloading of i.e. jrxml template
  Causes quite some metaspace usage (apart from being slow)

Where in backoffice we have code to cache the compiled templates (in memory) to avoid doing that repeatedly (while tomcat is running)

Doing that the below case came in in this module which was never contributed:
https://gitlab.com/openbravo/customers/SHARED/org.openbravo.mobile.core.transformjrxmltopdf/-/blob/master/src/org/openbravo/mobile/core/transformjrxmltopdf/JasperParser.java#L291 [^]

Looking at this again:
- Line 291 does NOT use backoffice jasper-cache
- Line 308 seems to implement some cache in that module on its own
https://gitlab.com/openbravo/customers/SHARED/org.openbravo.mobile.core.transformjrxmltopdf/-/blob/master/src/org/openbravo/mobile/core/transformjrxmltopdf/JasperParser.java#L308 [^]

But looking at the usage of this: here in line 216
https://gitlab.com/openbravo/customers/SHARED/org.openbravo.mobile.core.transformjrxmltopdf/-/blob/master/src/org/openbravo/mobile/core/transformjrxmltopdf/JasperParser.java#L216 [^]

Apparently it uses fillReport method passing 'String' of filename of compiled .jasper file to it
While that cache (line 308) avoids the compilation overhead is just runs that fullReport with filename over and over again


n/a
No tags attached.
Issue History
2023-12-19 18:06malsasuaNew Issue
2023-12-19 18:06malsasuaAssigned To => Triage Platform Base
2023-12-19 18:06malsasuaModules => Core
2023-12-19 18:06malsasuaTriggers an Emergency Pack => No
2024-01-08 14:03malsasuaDescription Updatedbug_revision_view_page.php?rev_id=27302#r27302
2024-02-09 09:01adrianromeroAssigned ToTriage Platform Base => Triage Platform Conn
2024-02-12 16:17adrianromeroDescription Updatedbug_revision_view_page.php?rev_id=27495#r27495
2024-03-01 08:49hgbotNote Added: 0161472
2024-03-01 08:56hgbotNote Added: 0161473
2024-03-01 13:45adrianromeroAssigned ToTriage Platform Conn => caristu
2024-03-01 13:45adrianromeroStatusnew => scheduled
2024-03-18 16:20hgbotNote Added: 0162289
2024-03-18 16:20hgbotNote Added: 0162290
2024-03-18 16:32hgbotNote Added: 0162291
2024-03-18 16:32hgbotNote Added: 0162292
2024-03-18 16:35caristuStatusscheduled => resolved
2024-03-18 16:35caristuFixed in SCM revision => 14b311cf
2024-03-18 16:35caristuResolutionopen => fixed
2024-03-18 16:36caristuFixed in SCM revision14b311cf =>
2024-03-18 16:36caristuReview Assigned To => alostale
2024-03-18 16:36caristuNote Added: 0162293
2024-03-18 16:36caristuStatusresolved => closed

Notes
(0161472)
hgbot   
2024-03-01 08:49   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1157 [^]
(0161473)
hgbot   
2024-03-01 08:56   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2467 [^]
(0162289)
hgbot   
2024-03-18 16:20   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2467 [^]
(0162290)
hgbot   
2024-03-18 16:20   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 0eb8be6220634254d1648aede267d6108469284a
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 18-03-2024 15:19:57
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/0eb8be6220634254d1648aede267d6108469284a [^]

related to BUG-54168: delete files also when sending the email fails

---
M src/org/openbravo/pos2/mailing/SendEmailLoader.java
---
(0162291)
hgbot   
2024-03-18 16:32   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 678b9fbc049e2208cb4fbae1d0450dab96243f4e
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 18-03-2024 13:06:33
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/678b9fbc049e2208cb4fbae1d0450dab96243f4e [^]

related to BUG-54168: improve jasper cache API to compile from the report desing content

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/CompiledReportManager.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java
M src-test/src/org/openbravo/test/reporting/ReportingUtilsTest.java
---
(0162292)
hgbot   
2024-03-18 16:32   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1157 [^]
(0162293)
caristu   
2024-03-18 16:36   
Merge request merged: https://gitlab.com/openbravo/customers/SHARED/org.openbravo.mobile.core.transformjrxmltopdf/-/merge_requests/3 [^]