Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035193Openbravo ERPA. Platformpublic2017-02-08 09:212017-03-15 20:19
caristu 
caristu 
immediateminoralways
closedfixed 
5
 
3.0PR17Q2 
alostale
Core
Pre packaging ( pi )
2017-01-23
https://code.openbravo.com/erp/devel/pi/rev/84e7958bae798b41046be8e1ed65ab7af1705587 [^]
No
0035193: Error fired when trying to print and attach a document
The following error is fired after trying to print and attach a document: @CODE=0@PooledConnection has already been closed.
1) Go to the [Sales Order] window
2) Select any record and click on print button in the toolbar
3) On the attach dialog, choose "Yes"
No tags attached.
related to defect 0032576 closed alostale connection leak when printing Requisition report 
caused by feature request 0034816 closed caristu Support a second database for reporting 
related to defect 0035356 closed caristu print & attach doc logs error using (old) commons jdbc pool 
related to defect 0036636 closed alostale new DalConnectionProvider() causes double flush in 1 case 
blocks defect 0035855 closed alostale many standard requests borrow more than one connection from DB 
Issue History
2017-02-08 09:21caristuNew Issue
2017-02-08 09:21caristuAssigned To => caristu
2017-02-08 09:21caristuModules => Core
2017-02-08 09:21caristuRegression level => Pre packaging ( pi )
2017-02-08 09:21caristuRegression date => 2017-01-23
2017-02-08 09:21caristuRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/84e7958bae798b41046be8e1ed65ab7af1705587 [^]
2017-02-08 09:21caristuTriggers an Emergency Pack => No
2017-02-08 09:39caristuRelationship addedcaused by 0034816
2017-02-08 09:40caristuRelationship addedrelated to 0032576
2017-02-08 10:30hgbotCheckin
2017-02-08 10:30hgbotNote Added: 0094143
2017-02-08 10:30hgbotStatusnew => resolved
2017-02-08 10:30hgbotResolutionopen => fixed
2017-02-08 10:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/016e52e2ba899eea507ff74c22e70ed3024865aa [^]
2017-02-08 10:31caristuReview Assigned To => alostale
2017-02-10 08:09alostaleNote Added: 0094200
2017-02-10 08:09alostaleStatusresolved => closed
2017-02-10 08:09alostaleFixed in Version => 3.0PR17Q2
2017-02-24 10:34alostaleRelationship addedrelated to 0035356
2017-03-15 20:19hudsonbotCheckin
2017-03-15 20:19hudsonbotNote Added: 0095170
2017-05-05 12:25alostaleRelationship addedblocks 0035855
2017-08-11 12:45caristuRelationship addedrelated to 0036636

Notes
(0094143)
hgbot   
2017-02-08 10:30   
Repository: erp/devel/pi
Changeset: 016e52e2ba899eea507ff74c22e70ed3024865aa
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Feb 08 10:27:02 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/016e52e2ba899eea507ff74c22e70ed3024865aa [^]

fixes issue 35193: Error fired when trying to print and attach a document

With the changes introduced with the read-only pool project, the reporting engine is making use of the DalConnectionProvider to get information from the database. On the other hand, the fix for issue 0032576 closes the Dal connection to avoid having connection leaks when using Dal from a subreport. Before having the read-only project that fix did not affect to the reporting engine because the PrintController class itself was the connection provider and its connection was not being closed by the subreports using Dal.

But now the same connection provider is used by the PrintController and also by the sub-reports (when they use Dal). For this reason we need to check if the current connection has been closed (by the sub-reports) and in that case, create a new session and return a new connection.

---
M src/org/openbravo/service/db/DalConnectionProvider.java
---
(0094200)
alostale   
2017-02-10 08:09   
code reviewed

tested also there are no leaks as per reported in 0032576
(0095170)
hudsonbot   
2017-03-15 20:19   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/54e102bef53e [^]
Maturity status: Test