Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035356
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2017-02-24 10:292017-03-15 20:20
ReporteralostaleView Statuspublic 
Assigned Tocaristu 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q2
StatusclosedFix in branchFixed in SCM revision1f961fdb2035
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression levelPre packaging ( pi )
Regression date2017-01-23
Regression introduced in releasepi
Regression introduced by commithttp://code.openbravo.com/erp/devel/pi/rev/84e7958bae798b41046be8e1ed65ab7af1705587 [^]
Triggers an Emergency PackNo
Summary

0035356: print & attach doc logs error using (old) commons jdbc pool

DescriptionWhen working with the old commons jdbc pool, an error is logged when printing a document if it is is also attached.
Steps To Reproduce1. 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)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035313 closedcaristu invoice PDF is not attached from "email" button in sales invoice window 
related to defect 0035193 closedcaristu Error fired when trying to print and attach a document 
related to defect 0032576 closedalostale connection leak when printing Requisition report 
related to defect 0023882 closedalostale 2 dangling DB connections after Tomcat start 
related to defect 0027155 closededuardo_Argal Cannot return the credit to a customer 
caused by feature request 0034816 closedcaristu Support a second database for reporting 
related to defect 0036636 closedalostale new DalConnectionProvider() causes double flush in 1 case 

-  Notes
(0094619)
caristu (developer)
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 (developer)
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
---
(0094631)
caristu (developer)
2017-02-27 10:53

Added test into TestLink: https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10558 [^]
(0094713)
alostale (developer)
2017-03-03 09:03

code reviewed + tested
(0095237)
hudsonbot (developer)
2017-03-15 20:20

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

- 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 View Revisions
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 View Revisions
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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker