Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0048673 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] Z. Others | major | always | 2022-01-21 22:10 | 2022-03-07 11:27 | |||
Reporter | ivazquez | View Status | public | |||||
Assigned To | caristu | |||||||
Priority | high | Resolution | fixed | Fixed in Version | PR21Q4.4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | PR21Q4.4 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | PR21Q2.3 | SCM revision | ||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | Production - Confirmed Stable | |||||||
Regression date | 2018-09-25 | |||||||
Regression introduced in release | 3.0PR18Q4 | |||||||
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/8a73e458127f7a40f4db9fc8583db06798e0856e [^] | |||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0048673: Some process definition reports stop working after upgrading from 18Q3 to 21Q2.3 | |||||||
Description | After an upgrade to version 21Q2.3 it was reported that a problem occurred when trying to generate process definition reports that make use of some org.openbravo.erpCommon.utility.Utility methods (that use DAL internally) in the header and also have a subreport executing a query. The error displayed by the stacktrace is as follows: Caused by: java.sql.SQLException: PooledConnection has already been closed. To clarify that in Openbravos.properties the following configuration is found this way: db.externalPoolClassName=org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool Related issue: https://issues.openbravo.com/view.php?id=47943 [^] | |||||||
Steps To Reproduce | 1.- Download and assemble a pristine in version 21Q2.3 2.- Install the module provided by the customer attached in the issue (which only has the process definition and the jaspers). 3.- Go to "Print Product" and select a product. 4.- Click on the button "Export to PDF". Returns the following error: net.sf.jasperreports.engine.JRException: Error preparing the statement to execute the report query. And in the logs you can see the error mentioned above | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0135370) hgbot (developer) 2022-03-01 18:14 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/533 [^] |
(0135489) hgbot (developer) 2022-03-07 11:27 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/533 [^] |
(0135490) hgbot (developer) 2022-03-07 11:27 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: 1895bf2aaad2999364bea5d47b29c531f1829792 Author: Carlos Aristu <carlos.aristu@openbravo.com> Date: 02-03-2022 08:28:28 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/1895bf2aaad2999364bea5d47b29c531f1829792 [^] fixes BUG-48673: manage the DAL connection of the subreports Jasper subreports are filled with a multi-threading mechanism. In case the threads use DAL to retrieve any information (for example an image) we must ensure that the DAL connection is closed to prevent connection leaks. For this reason, most of the Utility class methods are closing the connection on finish. But at the same time this can cause problems in case the DAL connection is reused both in the header and in the subreport query. In that case if the header closes the DAL connection through the Utility method, then the subreport will not be able to execute the query because the connection is already closed. To fix this problems, two actions are being taken: - We provide our own subreport runner factory to ensure that the threads used to fill the subreports close the DAL connections when they are finished. - The Utility methods are no longer closing the DAL connection, because this not needed anymore. --- A src/org/openbravo/dal/core/DalThreadCleaner.java A src/org/openbravo/report/jasper/SubreportRunner.java A src/org/openbravo/report/jasper/SubreportRunnerFactory.java M src/org/openbravo/dal/core/DalThreadHandler.java M src/org/openbravo/erpCommon/utility/Utility.java M src/org/openbravo/erpReports/jasperreports.properties --- |
Issue History | |||
Date Modified | Username | Field | Change |
2022-02-25 10:12 | caristu | Type | defect => backport |
2022-02-25 10:12 | caristu | Target Version | => PR21Q4.4 |
2022-03-01 18:14 | hgbot | Note Added: 0135370 | |
2022-03-07 11:27 | hgbot | Resolution | open => fixed |
2022-03-07 11:27 | hgbot | Status | scheduled => closed |
2022-03-07 11:27 | hgbot | Note Added: 0135489 | |
2022-03-07 11:27 | hgbot | Fixed in Version | => PR21Q4.4 |
2022-03-07 11:27 | hgbot | Note Added: 0135490 |
Copyright © 2000 - 2009 MantisBT Group |