Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0048748Openbravo ERPZ. Otherspublic2022-03-08 19:062022-04-04 17:37
ivazquez 
ivazquez 
highmajoralways
closedunable to reproduce 
5
PR21Q2.3 
PR21Q2.3 
AugustoMauch
Core
No
0048748: Open database connections are left open when printing reports (post upgrade from 18Q3 to 21Q2.3)
The process definition "Print National Invoices" prints invoices applying some filters, this report is a report containing two images.

One is obtained from the form: org.openbravo.erpCommon.utility.Utility.showImageLogo("yourcompanylegal", $F{organizationid})
and the other of the form:
org.openbravo.erpCommon.utility.Utility.showImage($F{org_invoice_image}).
Each time the report is called, two connections remain open until postgres finally blocks the connections from reaching the maximum.

Connections that remain open:

a)

select adimage0_.AD_Image_ID as AD_Image1_48_0_, adimage0_.AD_Client_ID as AD_Clien2_48_0_, adimage0_.AD_Org_ID as AD_Org_I3_48_0_, adimage0_.IsActive as IsActive4_48_0_, adimage0_.Created as Created5_48_0_, adimage0_.CreatedBy as CreatedB6_48_0_, adimage0_.Updated as Updated7_48_0_, adimage0_.UpdatedBy as UpdatedB8_48_0_, adimage0_.Name as Name9_48_0_, adimage0_.ImageURL as ImageUR10_48_0_, adimage0_.BinaryData as BinaryD11_48_0_, adimage0_.Width as Width12_48_0_, adimage0_.Height as Height13_48_0_, adimage0_.Mimetype as Mimetyp14_48_0_ from AD_Image adimage0_ where adimage0_.AD_Image_ID=$1

b)

select adimage0_.AD_Image_ID as AD_Image1_48_0_, adimage0_.AD_Client_ID as AD_Clien2_48_0_, adimage0_.AD_Org_ID as AD_Org_I3_48_0_, adimage0_.IsActive as IsActive4_48_0_, adimage0_.Created as Created5_48_0_, adimage0_.CreatedBy as CreatedB6_48_0_, adimage0_.Updated as Updated7_48_0_, adimage0_.UpdatedBy as UpdatedB8_48_0_, adimage0_.Name as Name9_48_0_, adimage0_.ImageURL as ImageUR10_48_0_, adimage0_.BinaryData as BinaryD11_48_0_, adimage0_.Width as Width12_48_0_, adimage0_.Height as Height13_48_0_, adimage0_.Mimetype as Mimetyp14_48_0_ from AD_Image adimage0_ where adimage0_.AD_Image_ID in ($1, $2)

This error has also been occurring since the customer upgraded from 18Q3 to 21Q2.3.


-Attached images:

1.- The process definition that the customer uses to print invoices
3.- The definition of a process definition in the Application Dictionary
4.- How the connections look like after 3 runs of the invoice printing (each run opens two new connections)
1.- Go to "Print National Invoices"
2.- Complete all required fields
3.- Click on the button "Export to PDF"

Verify in the database that the open connections are still open (Images are attached).
No tags attached.
related to defect 0048465 closed caristu Some process definition reports stop working after upgrading from 18Q3 to 21Q2.3 
png 01 -imprimir_facturas.png (56,321) 2022-03-08 19:06
https://issues.openbravo.com/file_download.php?file_id=16710&type=bug
png

png 03 - DefiniciĆ³n del process definition.png (105,127) 2022-03-08 19:07
https://issues.openbravo.com/file_download.php?file_id=16712&type=bug
png

png 04 - conexiones abiertas tras tres procesos.png (77,334) 2022-03-08 19:07
https://issues.openbravo.com/file_download.php?file_id=16713&type=bug
png

? Invoice_Taxes.jrxml (5,784) 2022-03-11 18:30
https://issues.openbravo.com/file_download.php?file_id=16739&type=bug
? Invoice_Lines.jrxml (17,913) 2022-03-11 18:31
https://issues.openbravo.com/file_download.php?file_id=16740&type=bug
? Invoice_DueDates.jrxml (2,852) 2022-03-11 18:31
https://issues.openbravo.com/file_download.php?file_id=16741&type=bug
? Invoice_DiscountsFinancial.jrxml (3,168) 2022-03-11 18:31
https://issues.openbravo.com/file_download.php?file_id=16742&type=bug
? Invoice_Discounts.jrxml (3,154) 2022-03-11 18:32
https://issues.openbravo.com/file_download.php?file_id=16743&type=bug
? InvoiceDetails.jrxml (38,700) 2022-03-11 18:32
https://issues.openbravo.com/file_download.php?file_id=16744&type=bug
? Invoice_AditionalCosts.jrxml (3,198) 2022-03-11 18:32
https://issues.openbravo.com/file_download.php?file_id=16745&type=bug
? Invoice.jrxml (14,593) 2022-03-11 18:32
https://issues.openbravo.com/file_download.php?file_id=16746&type=bug
? com.openbravo.gps.sales.reports.tar.xz (604,652) 2022-03-17 14:53
https://issues.openbravo.com/file_download.php?file_id=16777&type=bug
Issue History
2022-03-08 19:06ivazquezNew Issue
2022-03-08 19:06ivazquezAssigned To => Triage Omni OMS
2022-03-08 19:06ivazquezFile Added: 01 -imprimir_facturas.png
2022-03-08 19:06ivazquezModules => Core
2022-03-08 19:06ivazquezTriggers an Emergency Pack => No
2022-03-08 19:06ivazquezFile Added: 02 - factura resultante.png
2022-03-08 19:07ivazquezFile Added: 03 - DefiniciĆ³n del process definition.png
2022-03-08 19:07ivazquezFile Added: 04 - conexiones abiertas tras tres procesos.png
2022-03-08 19:10ivazquezRelationship addedrelated to 0048465
2022-03-08 19:12ivazquezFile Deleted: 02 - factura resultante.png
2022-03-08 19:12ivazquezDescription Updatedbug_revision_view_page.php?rev_id=23745#r23745
2022-03-08 19:22aferrazAssigned ToTriage Omni OMS => Triage Platform Base
2022-03-10 16:35AugustoMauchStatusnew => feedback
2022-03-10 16:36AugustoMauchAssigned ToTriage Platform Base => ivazquez
2022-03-10 16:38AugustoMauchNote Added: 0135627
2022-03-11 18:30ivazquezFile Added: Invoice_Taxes.jrxml
2022-03-11 18:31ivazquezFile Added: Invoice_Lines.jrxml
2022-03-11 18:31ivazquezFile Added: Invoice_DueDates.jrxml
2022-03-11 18:31ivazquezFile Added: Invoice_DiscountsFinancial.jrxml
2022-03-11 18:32ivazquezFile Added: Invoice_Discounts.jrxml
2022-03-11 18:32ivazquezFile Added: InvoiceDetails.jrxml
2022-03-11 18:32ivazquezFile Added: Invoice_AditionalCosts.jrxml
2022-03-11 18:32ivazquezFile Added: Invoice.jrxml
2022-03-11 18:34ivazquezNote Added: 0135665
2022-03-16 18:13ivazquezAssigned Toivazquez => Triage Platform Base
2022-03-16 18:13ivazquezStatusfeedback => new
2022-03-17 14:50AugustoMauchNote Added: 0135807
2022-03-17 14:50AugustoMauchAssigned ToTriage Platform Base => ivazquez
2022-03-17 14:50AugustoMauchStatusnew => feedback
2022-03-17 14:53ivazquezFile Added: com.openbravo.gps.sales.reports.tar.xz
2022-03-17 14:59ivazquezNote Added: 0135808
2022-03-21 16:09ivazquezAssigned Toivazquez => Triage Platform Base
2022-03-21 16:09ivazquezStatusfeedback => new
2022-03-28 21:27AugustoMauchNote Added: 0136119
2022-03-28 21:27AugustoMauchAssigned ToTriage Platform Base => ivazquez
2022-03-28 21:27AugustoMauchStatusnew => feedback
2022-04-04 17:35ivazquezNote Added: 0136319
2022-04-04 17:35ivazquezResolutionopen => unable to reproduce
2022-04-04 17:37ivazquezReview Assigned To => AugustoMauch
2022-04-04 17:37ivazquezStatusfeedback => closed

Notes
(0135627)
AugustoMauch   
2022-03-10 16:38   
Ignacio, this issue should no longer be reproducible after this change [1], where we changed the way we manage the transactions of reports.

[1] https://issues.openbravo.com/view.php?id=48465 [^]
(0135665)
ivazquez   
2022-03-11 18:34   
I attach the .jrxml that the client tries to use and idle transactions remain in postgres.
Also, note that this problem comes from before the problem of issue 48465, the client thought that it would be solved with the same patch as that ticket, but it was not!

Regards,
Ignacio Vazquez
(0135807)
AugustoMauch   
2022-03-17 14:50   
Hello,

Can you please share with us the module needed to reproduce the issue? Feel free to send it over email if it cannot be attached to this issue
(0135808)
ivazquez   
2022-03-17 14:59   
Hello Augusto,

I leave attached the corresponding module!

Regards,
Ignacio Vazquez
(0136119)
AugustoMauch   
2022-03-28 21:27   
Hello Ignacio,

I move this issue to the feedback status, until you can share with us the dependencies to test the module.
(0136319)
ivazquez   
2022-04-04 17:35   
Hello everyone,

The customer cannot reproduce the error in his production environment nor in test....

So they will be aware of what happens again let us know.

We will close the issue for now!

Regards,
IgnaciO Vazquez