Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0035356 | Openbravo ERP | A. Platform | public | 2017-02-24 10:29 | 2017-03-15 20:20 |
|
Reporter | alostale | |
Assigned To | caristu | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR17Q2 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Pre packaging ( pi ) |
Regression date | 2017-01-23 |
Regression introduced in release | pi |
Regression introduced by commit | http://code.openbravo.com/erp/devel/pi/rev/84e7958bae798b41046be8e1ed65ab7af1705587 [^] |
Triggers an Emergency Pack | No |
|
Summary | 0035356: print & attach doc logs error using (old) commons jdbc pool |
Description | When working with the old commons jdbc pool, an error is logged when printing a document if it is is also attached. |
Steps To Reproduce | 1. set up Openbravo.properties to use old setting "db.externalPoolClassName="
2. Select any completed sales invoice
3. Click on print report
4. Select to attach the report once generated
-> ERROR check logs:
javax.servlet.ServletException: @CODE=@connnection proxy not usable after transaction completion
at org.openbravo.erpCommon.utility.MessageBDData.message(MessageBDData.java:134)
at org.openbravo.erpCommon.utility.BasicUtility.messageBD(BasicUtility.java:76)
at org.openbravo.erpCommon.utility.Utility.messageBD(Utility.java:303)
at org.openbravo.erpCommon.utility.reporting.ReportManager.processReport(ReportManager.java:104)
at org.openbravo.erpCommon.utility.reporting.printing.PrintController.post(PrintController.java:256)
at org.openbravo.erpCommon.utility.reporting.printing.PrintInvoices.doPost(PrintInvoices.java:54)
|
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0035313 | | closed | caristu | invoice PDF is not attached from "email" button in sales invoice window | related to | defect | 0035193 | | closed | caristu | Error fired when trying to print and attach a document | related to | defect | 0032576 | | closed | alostale | connection leak when printing Requisition report | related to | defect | 0023882 | | closed | alostale | 2 dangling DB connections after Tomcat start | related to | defect | 0027155 | | closed | eduardo_Argal | Cannot return the credit to a customer | caused by | feature request | 0034816 | | closed | caristu | Support a second database for reporting | related to | defect | 0036636 | | closed | alostale | new DalConnectionProvider() causes double flush in 1 case |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2017-02-24 10:29 | alostale | New Issue | |
2017-02-24 10:29 | alostale | Assigned To | => platform |
2017-02-24 10:29 | alostale | Modules | => Core |
2017-02-24 10:29 | alostale | Triggers an Emergency Pack | => No |
2017-02-24 10:30 | alostale | Relationship added | related to 0035313 |
2017-02-24 10:30 | alostale | Status | new => acknowledged |
2017-02-24 10:34 | alostale | Relationship added | related to 0035193 |
2017-02-24 15:20 | caristu | Relationship added | caused by 0034816 |
2017-02-24 15:21 | caristu | Regression level | => Pre packaging ( pi ) |
2017-02-24 15:21 | caristu | Regression date | => 2017-01-23 |
2017-02-24 15:21 | caristu | Regression introduced in release | => pi |
2017-02-24 15:21 | caristu | Regression introduced by commit | => http://code.openbravo.com/erp/devel/pi/rev/84e7958bae798b41046be8e1ed65ab7af1705587 [^] |
2017-02-24 15:21 | caristu | Relationship added | related to 0032576 |
2017-02-24 15:26 | caristu | Note Added: 0094619 | |
2017-02-24 15:26 | caristu | Status | acknowledged => scheduled |
2017-02-24 15:26 | caristu | Assigned To | platform => caristu |
2017-02-27 08:42 | caristu | Note Edited: 0094619 | bug_revision_view_page.php?bugnote_id=0094619#r14680 |
2017-02-27 09:11 | caristu | Regression level | Pre packaging ( pi ) => |
2017-02-27 09:11 | caristu | Regression date | 2017-01-23 => |
2017-02-27 09:11 | caristu | Regression introduced in release | pi => |
2017-02-27 09:11 | caristu | Regression introduced by commit | http://code.openbravo.com/erp/devel/pi/rev/84e7958bae798b41046be8e1ed65ab7af1705587 [^] => |
2017-02-27 09:35 | caristu | Regression level | => Pre packaging ( pi ) |
2017-02-27 09:35 | caristu | Regression introduced in release | => pi |
2017-02-27 09:35 | caristu | Regression introduced by commit | => http://code.openbravo.com/erp/devel/pi/rev/84e7958bae798b41046be8e1ed65ab7af1705587 [^] |
2017-02-27 09:35 | caristu | Regression date | => 2017-01-23 |
2017-02-27 10:22 | caristu | Relationship added | related to 0023882 |
2017-02-27 10:23 | caristu | Relationship added | related to 0027155 |
2017-02-27 10:28 | caristu | Note Edited: 0094619 | bug_revision_view_page.php?bugnote_id=0094619#r14681 |
2017-02-27 10:52 | hgbot | Checkin | |
2017-02-27 10:52 | hgbot | Note Added: 0094630 | |
2017-02-27 10:52 | hgbot | Status | scheduled => resolved |
2017-02-27 10:52 | hgbot | Resolution | open => fixed |
2017-02-27 10:52 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/1f961fdb2035b67112525fb3dfc9a5fe6535da5a [^] |
2017-02-27 10:53 | caristu | Review Assigned To | => alostale |
2017-02-27 10:53 | caristu | Note Added: 0094631 | |
2017-03-03 09:03 | alostale | Note Added: 0094713 | |
2017-03-03 09:03 | alostale | Status | resolved => closed |
2017-03-03 09:03 | alostale | Fixed in Version | => 3.0PR17Q2 |
2017-03-15 20:20 | hudsonbot | Checkin | |
2017-03-15 20:20 | hudsonbot | Note Added: 0095237 | |
2017-08-11 12:45 | caristu | Relationship added | related to 0036636 |
Notes |
|
(0094619)
|
caristu
|
2017-02-24 15:26
(edited on: 2017-02-27 10:28) |
|
This problem is caused because since feature 0034816 the ReportManager makes use of the DalConnectionProvider to generate reports.
When priting + attach, the transaction is closed at the middle of this process by the fix introduced with issue 0032576, causing this error to be reproduced but just when the external connection pool is not defined.
Note that this was a problem which already existed, but since 0034816 is visible in an easier way.
|
|
|
(0094630)
|
hgbot
|
2017-02-27 10:52
|
|
Repository: erp/devel/pi
Changeset: 1f961fdb2035b67112525fb3dfc9a5fe6535da5a
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Feb 27 10:50:16 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1f961fdb2035b67112525fb3dfc9a5fe6535da5a [^]
fixes bug 35356: print & attach doc logs error using (old) commons jdbc pool
After closing a connection retrieved from the Hibernate pool, it is marked as not usable. It is not possible to check the status of such connections because a HibernateException is thrown.
After printing a report which makes use of the getCountryNumberFormat and applyCountryDateFormat methods of the Utility class, the connection is closed to prevent possible connection leaks. Therefore, when using the Hibernate pool, the connection is marked as not usable causing the HibernateException when checking the status of the connection after printing the report.
To fix the problem now we are handling the HibernateException and initializing the connection properly.
---
M src/org/openbravo/service/db/DalConnectionProvider.java
---
|
|
|
|
|
|
|
|
|
|
|