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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036697
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2017-08-23 08:412017-09-21 16:49
ReporteregoitzView Statuspublic 
Assigned Tocaristu 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revision80ab9332dfc5
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036697: connection leak when printing a image on a jasper subreport using the Utility.showImage method

DescriptionIf you create a report that prints an image on the subreport using the method
 org.openbravo.erpCommon.utility.Utility.showImage($F{ad_image_id})
the connections is not closed. It is kept with 'idle in transaction' status.
Steps To Reproduce1-Create a report prininting an image on the subreport using the
 org.openbravo.erpCommon.utility.Utility.showImage($F{ad_image_id}) method.

 1a- Apply the attached patch (subreportImage.diff), which adds an image in the subreport of the "Print Requisition" report.

 1b- Recompile and restart tomcat.

2- In DB (PG) execute: select * from pg_stat_activity where state = 'idle in transaction'
  -> Check there are no rows

3- Execute the report
  
  3a - Go to the [Requisition] window. Create a new record in the header.
  
  3b- Move to the [Lines] tab and create one record at least.

  3c- Generate the report by clicking on the print record of the toolbar.

4- Execute again select * from pg_stat_activity where state = 'idle in transaction'
  -> Check there is one row

TagsPerformance
Attached Filesdiff file icon subreportImage.diff [^] (40,214 bytes) 2017-08-23 12:16 [Show Content]
diff file icon issue36697.diff [^] (1,438 bytes) 2017-08-23 12:52 [Show Content]
diff file icon issue36697v2.diff [^] (2,645 bytes) 2017-08-23 13:20 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0032576 closedalostale connection leak when printing Requisition report 
related to design defect 0030182 closedTriage Platform Base jasper subreports using DAL do leak connection + transactions 
related to defect 0039194 closedcaristu Improve parameter name in Utility.getImage(String, boolean) method 
related to defect 0039261 closedjarmendariz connection leak when printing image on subreports using the Utility.showImageLogo method 
related to defect 0048465 closedcaristu Some process definition reports stop working after upgrading from 18Q3 to 21Q2.3 

-  Notes
(0098629)
hgbot (developer)
2017-08-24 12:14

Repository: erp/devel/pi
Changeset: 80ab9332dfc520dde252b67de567b0aaae00007a
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Aug 24 12:12:26 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/80ab9332dfc520dde252b67de567b0aaae00007a [^]

fixes issue 36697: connection leak when using Utility.showImage in a subreport

 Ensure that the showImage method, which is part of the API used by the reports to retrieve an image from the database, closes the DAL transaction after using it so that the connection is returned back to the pool. Thus, we avoid connection leaks when it is used in a subreport.

---
M src/org/openbravo/erpCommon/utility/Utility.java
---
(0098674)
alostale (manager)
2017-08-29 08:00

reviewed + tested
(0099324)
hudsonbot (developer)
2017-09-21 16:49

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/9750b78d3e5c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-08-23 08:41 egoitz New Issue
2017-08-23 08:41 egoitz Assigned To => platform
2017-08-23 08:41 egoitz Modules => Core
2017-08-23 08:41 egoitz Resolution time => 1505253600
2017-08-23 08:41 egoitz Triggers an Emergency Pack => No
2017-08-23 08:41 egoitz Issue generated from 0032576
2017-08-23 08:41 egoitz Relationship added related to 0032576
2017-08-23 10:35 caristu Relationship added related to 0030182
2017-08-23 12:09 caristu Assigned To platform => caristu
2017-08-23 12:16 caristu Steps to Reproduce Updated View Revisions
2017-08-23 12:16 caristu File Added: subreportImage.diff
2017-08-23 12:43 caristu Status new => scheduled
2017-08-23 12:52 caristu File Added: issue36697.diff
2017-08-23 12:52 caristu Steps to Reproduce Updated View Revisions
2017-08-23 13:20 caristu File Added: issue36697v2.diff
2017-08-23 14:04 caristu Tag Attached: Performance
2017-08-24 11:24 caristu Summary connection leak when printing a image on a jasper subreport => connection leak when printing a image on a jasper subreport with showImage method
2017-08-24 11:24 caristu Summary connection leak when printing a image on a jasper subreport with showImage method => connection leak when printing a image on a jasper subreport using the Utility.showImage method
2017-08-24 12:14 hgbot Checkin
2017-08-24 12:14 hgbot Note Added: 0098629
2017-08-24 12:14 hgbot Status scheduled => resolved
2017-08-24 12:14 hgbot Resolution open => fixed
2017-08-24 12:14 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/80ab9332dfc520dde252b67de567b0aaae00007a [^]
2017-08-24 12:15 caristu Review Assigned To => alostale
2017-08-29 08:00 alostale Note Added: 0098674
2017-08-29 08:00 alostale Status resolved => closed
2017-08-29 08:00 alostale Fixed in Version => 3.0PR17Q4
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099324
2018-08-28 14:16 caristu Relationship added related to 0039194
2018-09-11 09:44 JONHM Relationship added related to 0039261
2022-02-02 12:56 caristu Relationship added related to 0048465


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker