Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036697 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | have not tried | 2017-08-23 08:41 | 2017-09-21 16:49 | |||
Reporter | egoitz | View Status | public | |||||
Assigned To | caristu | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR17Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 80ab9332dfc5 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | alostale | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036697: connection leak when printing a image on a jasper subreport using the Utility.showImage method | |||||||
Description | If 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 Reproduce | 1-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 | |||||||
Tags | Performance | |||||||
Attached Files | subreportImage.diff [^] (40,214 bytes) 2017-08-23 12:16 [Show Content] [Hide Content]diff --git a/src/org/openbravo/erpReports/RptM_Requisition_Lines.jrxml b/src/org/openbravo/erpReports/RptM_Requisition_Lines.jrxml --- a/src/org/openbravo/erpReports/RptM_Requisition_Lines.jrxml +++ b/src/org/openbravo/erpReports/RptM_Requisition_Lines.jrxml @@ -1,315 +1,327 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Created with Jaspersoft Studio version 6.0.0.final using JasperReports Library version 6.0.0 --> +<!-- 2017-08-23T11:35:29 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RptM_Requisition_Lines" pageWidth="483" pageHeight="842" columnWidth="483" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="5b3bd9f3-8d27-41ab-9a65-993f1b0760f6"> - <property name="ireport.scriptlethandling" value="0"/> - <property name="ireport.encoding" value="UTF-8"/> - <import value="net.sf.jasperreports.engine.*"/> - <import value="java.util.*"/> - <import value="net.sf.jasperreports.engine.data.*"/> - <style name="default" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="8"/> - <style name="Report_Title" fontName="Bitstream Vera Sans" fontSize="18"> - <box leftPadding="5"/> - </style> - <style name="Report_Subtitle" forecolor="#555555" fontName="Bitstream Vera Sans" fontSize="14"> - <box leftPadding="5"/> - </style> - <style name="Report_Data_Label" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"/> - <style name="Report_Data_Field" fontName="Bitstream Vera Sans" fontSize="11" isBold="false"/> - <style name="Total_Field" mode="Opaque" forecolor="#000000" backcolor="#CCCCCC" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"> - <box leftPadding="5"/> - </style> - <style name="GroupHeader_DarkGray" mode="Opaque" forecolor="#FFFFFF" backcolor="#555555" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="12" isBold="true"> - <box leftPadding="5"/> - </style> - <style name="Group_Data_Label" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"/> - <style name="Group_Data_Field" fontName="Bitstream Vera Sans" fontSize="11"/> - <style name="Detail_Header" mode="Opaque" forecolor="#FFFFFF" backcolor="#5D5D5D" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="10" isBold="true"> - <box leftPadding="5"> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - </box> - </style> - <style name="Detail_Line" fontName="Bitstream Vera Sans" fontSize="8"> - <conditionalStyle> - <conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression> - <style mode="Opaque" backcolor="#CCCCCC"/> - </conditionalStyle> - </style> - <style name="Total_Gray" mode="Opaque" forecolor="#000000" backcolor="#CCCCCC"/> - <style name="Detail_Data_Label" mode="Opaque" backcolor="#CCCCCC" fontName="Bitstream Vera Sans" fontSize="10" isBold="true"/> - <style name="Detail_Data_Field" mode="Opaque" backcolor="#CCCCCC" fontName="Bitstream Vera Sans" fontSize="10"/> - <style name="Group_Footer" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"/> - <style name="Report_Footer" isDefault="true" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="11"/> - <parameter name="REQUISITION_ID" class="java.lang.String" isForPrompting="false"> - <defaultValueExpression><![CDATA["1000001"]]></defaultValueExpression> - </parameter> - <parameter name="LOCALE" class="java.util.Locale" isForPrompting="false"/> - <parameter name="NUMBERFORMAT" class="java.text.NumberFormat" isForPrompting="false"/> - <queryString> - <![CDATA[SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_REQUISITIONLINE.QTY, + <property name="ireport.scriptlethandling" value="0"/> + <property name="ireport.encoding" value="UTF-8"/> + <import value="net.sf.jasperreports.engine.*"/> + <import value="java.util.*"/> + <import value="net.sf.jasperreports.engine.data.*"/> + <style name="default" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="8"/> + <style name="Report_Title" fontName="Bitstream Vera Sans" fontSize="18"> + <box leftPadding="5"/> + </style> + <style name="Report_Subtitle" forecolor="#555555" fontName="Bitstream Vera Sans" fontSize="14"> + <box leftPadding="5"/> + </style> + <style name="Report_Data_Label" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"/> + <style name="Report_Data_Field" fontName="Bitstream Vera Sans" fontSize="11" isBold="false"/> + <style name="Total_Field" mode="Opaque" forecolor="#000000" backcolor="#CCCCCC" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"> + <box leftPadding="5"/> + </style> + <style name="GroupHeader_DarkGray" mode="Opaque" forecolor="#FFFFFF" backcolor="#555555" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="12" isBold="true"> + <box leftPadding="5"/> + </style> + <style name="Group_Data_Label" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"/> + <style name="Group_Data_Field" fontName="Bitstream Vera Sans" fontSize="11"/> + <style name="Detail_Header" mode="Opaque" forecolor="#FFFFFF" backcolor="#5D5D5D" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="10" isBold="true"> + <box leftPadding="5"> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + </box> + </style> + <style name="Detail_Line" fontName="Bitstream Vera Sans" fontSize="8"> + <conditionalStyle> + <conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression> + <style mode="Opaque" backcolor="#CCCCCC"/> + </conditionalStyle> + </style> + <style name="Total_Gray" mode="Opaque" forecolor="#000000" backcolor="#CCCCCC"/> + <style name="Detail_Data_Label" mode="Opaque" backcolor="#CCCCCC" fontName="Bitstream Vera Sans" fontSize="10" isBold="true"/> + <style name="Detail_Data_Field" mode="Opaque" backcolor="#CCCCCC" fontName="Bitstream Vera Sans" fontSize="10"/> + <style name="Group_Footer" fontName="Bitstream Vera Sans" fontSize="11" isBold="true"/> + <style name="Report_Footer" isDefault="true" vAlign="Middle" fontName="Bitstream Vera Sans" fontSize="11"/> + <parameter name="REQUISITION_ID" class="java.lang.String" isForPrompting="false"> + <defaultValueExpression><![CDATA["1000001"]]></defaultValueExpression> + </parameter> + <parameter name="LOCALE" class="java.util.Locale" isForPrompting="false"/> + <parameter name="NUMBERFORMAT" class="java.text.NumberFormat" isForPrompting="false"/> + <queryString> + <![CDATA[SELECT M_PRODUCT.VALUE, M_PRODUCT.NAME, M_REQUISITIONLINE.QTY, C_UOM.UOMSYMBOL AS UOMSYMBOL, M_REQUISITIONLINE.LINENETAMT, M_REQUISITIONLINE.AD_ORG_ID AS ORGANIZATIONID, M_REQUISITIONLINE.PRICEACTUAL, M_REQUISITIONLINE.NEEDBYDATE, (CASE WHEN M_ATTRIBUTESETINSTANCE.M_ATTRIBUTESET_ID IS NULL THEN '' WHEN M_ATTRIBUTESETINSTANCE.M_ATTRIBUTESET_ID='0' THEN '' ELSE TO_CHAR(M_ATTRIBUTESETINSTANCE.DESCRIPTION) END) AS ATTRIBUTE - FROM M_PRODUCT inner join M_REQUISITIONLINE on M_REQUISITIONLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID + FROM M_PRODUCT inner join M_REQUISITIONLINE on M_REQUISITIONLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID left join M_ATTRIBUTESETINSTANCE on M_REQUISITIONLINE.M_ATTRIBUTESETINSTANCE_ID = M_ATTRIBUTESETINSTANCE.M_ATTRIBUTESETINSTANCE_ID, C_UOM - WHERE M_REQUISITIONLINE.C_UOM_ID = C_UOM.C_UOM_ID - AND M_REQUISITIONLINE.M_REQUISITION_ID = $P{REQUISITION_ID} - ORDER BY M_REQUISITIONLINE.NEEDBYDATE, M_PRODUCT.NAME]]> - </queryString> - <field name="VALUE" class="java.lang.String"/> - <field name="NAME" class="java.lang.String"/> - <field name="QTY" class="java.math.BigDecimal"/> - <field name="UOMSYMBOL" class="java.lang.String"/> - <field name="LINENETAMT" class="java.math.BigDecimal"/> - <field name="PRICEACTUAL" class="java.math.BigDecimal"/> - <field name="NEEDBYDATE" class="java.util.Date"/> - <field name="ATTRIBUTE" class="java.lang.String"/> - <field name="ORGANIZATIONID" class="java.lang.String"/> - <variable name="AMOUNT_SUM" class="java.math.BigDecimal" resetType="Group" resetGroup="REQUISITION_ID" calculation="Sum"> - <variableExpression><![CDATA[$F{LINENETAMT}]]></variableExpression> - </variable> - <variable name="AMOUNT_SUM_1" class="java.math.BigDecimal" resetType="Group" resetGroup="REQUISITION_ID" calculation="Sum"> - <variableExpression><![CDATA[$F{LINENETAMT}]]></variableExpression> - </variable> - <group name="REQUISITION_ID"> - <groupExpression><![CDATA[$P{REQUISITION_ID}]]></groupExpression> - <groupHeader> - <band height="16" splitType="Stretch"> - <staticText> - <reportElement key="element-1" style="Detail_Header" x="0" y="0" width="50" height="16" uuid="7779509d-97bd-4190-afe8-beb39c30496b"/> - <box leftPadding="5"> - <pen lineWidth="0.0"/> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font pdfFontName="Helvetica-Bold"/> - </textElement> - <text><![CDATA[Ref.]]></text> - </staticText> - <staticText> - <reportElement key="element-3" style="Detail_Header" x="50" y="0" width="138" height="16" uuid="ada64ec7-62ac-4796-870d-4698657b65be"/> - <box leftPadding="5"> - <pen lineWidth="0.0"/> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"/> - <text><![CDATA[Product Name]]></text> - </staticText> - <staticText> - <reportElement key="element-4" style="Detail_Header" x="343" y="0" width="50" height="16" uuid="a07ab159-2013-4e69-8f52-ef5d0a189455"/> - <box leftPadding="5"> - <pen lineWidth="0.0"/> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"/> - <text><![CDATA[Qty.]]></text> - </staticText> - <staticText> - <reportElement key="element-5" style="Detail_Header" x="433" y="0" width="50" height="16" uuid="021099f1-85de-4edb-9832-dc917df84730"/> - <box leftPadding="5"> - <pen lineWidth="0.0"/> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"/> - <text><![CDATA[Amt.]]></text> - </staticText> - <staticText> - <reportElement key="element-6" style="Detail_Header" x="188" y="0" width="75" height="16" uuid="01b057dd-38eb-489c-8890-4f5eb3c8768c"/> - <box leftPadding="5"> - <pen lineWidth="0.0"/> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"/> - <text><![CDATA[Attribute]]></text> - </staticText> - <staticText> - <reportElement key="element-7" style="Detail_Header" x="393" y="0" width="40" height="16" uuid="ac892ae9-c953-45c7-a749-0d728cd12f0d"/> - <box leftPadding="5"> - <pen lineWidth="0.0"/> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Middle"/> - <text><![CDATA[Price]]></text> - </staticText> - <staticText> - <reportElement key="element-8" style="Detail_Header" x="263" y="0" width="80" height="16" uuid="2b97ccf6-3a1a-41b5-a689-0cf199a14175"/> - <box leftPadding="5"> - <pen lineWidth="0.0"/> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Middle"> - <font pdfFontName="Helvetica-Bold"/> - </textElement> - <text><![CDATA[Need by]]></text> - </staticText> - </band> - </groupHeader> - <groupFooter> - <band height="17" splitType="Stretch"> - <line> - <reportElement key="line" positionType="FixRelativeToBottom" x="0" y="0" width="483" height="1" forecolor="#000000" uuid="06741801-88ff-4798-81b9-12033ec8f539"/> - <graphicElement> - <pen lineWidth="0.25" lineStyle="Solid"/> - </graphicElement> - </line> - <staticText> - <reportElement key="staticText-2" style="Report_Data_Label" x="355" y="1" width="46" height="16" uuid="bd8d6529-8b2a-43a8-a57c-5f57f87bfb35"/> - <box leftPadding="5"> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement> - <font size="10"/> - </textElement> - <text><![CDATA[Total:]]></text> - </staticText> - <textField pattern="" isBlankWhenNull="false"> - <reportElement key="textField" style="Total_Gray" x="401" y="1" width="82" height="16" uuid="4b895e91-ff0d-4b55-b24f-d837cbbfac05"/> - <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#FFFFFF"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#FFFFFF"/> - </box> - <textElement textAlignment="Right"/> - <textFieldExpression><![CDATA[($V{AMOUNT_SUM}!=null)?$P{NUMBERFORMAT}.format($V{AMOUNT_SUM}):new String(" ")]]></textFieldExpression> - </textField> - </band> - </groupFooter> - </group> - <background> - <band splitType="Stretch"/> - </background> - <title> - <band splitType="Stretch"/> - </title> - <pageHeader> - <band splitType="Stretch"/> - </pageHeader> - <columnHeader> - <band splitType="Stretch"/> - </columnHeader> - <detail> - <band height="16" splitType="Stretch"> - <frame> - <reportElement key="frame-1" style="Detail_Line" stretchType="RelativeToBandHeight" x="0" y="0" width="483" height="16" uuid="5b0cd77f-dbce-4544-a6fc-9b4452c1c171"/> - <box> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement key="textField-1" style="default" stretchType="RelativeToBandHeight" x="0" y="0" width="50" height="16" uuid="6516ee69-21f4-4203-b1fa-6d7024814ffb"/> - <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Top"/> - <textFieldExpression><![CDATA[$F{VALUE}]]></textFieldExpression> - </textField> - <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement key="textField-3" style="default" stretchType="RelativeToBandHeight" x="50" y="0" width="138" height="16" uuid="a972de98-127e-4295-bad1-f0702aec8f62"/> - <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement verticalAlignment="Top"/> - <textFieldExpression><![CDATA[$F{NAME}]]></textFieldExpression> - </textField> - <textField isStretchWithOverflow="true" isBlankWhenNull="true"> - <reportElement key="textField-6" style="default" stretchType="RelativeToBandHeight" x="188" y="0" width="75" height="16" uuid="4b9825f6-e2c3-4234-ba9e-f949e9465a6a"/> - <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement verticalAlignment="Top"/> - <textFieldExpression><![CDATA[$F{ATTRIBUTE}]]></textFieldExpression> - </textField> - <textField isStretchWithOverflow="true" isBlankWhenNull="false"> - <reportElement key="textField-4" style="default" stretchType="RelativeToBandHeight" x="343" y="0" width="50" height="16" uuid="49c21581-18bd-4584-b4bf-f6361fd145c1"/> - <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Top"/> - <textFieldExpression><![CDATA[($F{QTY}!=null)?$P{NUMBERFORMAT}.format($F{QTY})+" "+$F{UOMSYMBOL}:new String(" ")]]></textFieldExpression> - </textField> - <textField isStretchWithOverflow="true" isBlankWhenNull="false"> - <reportElement key="textField-7" style="default" stretchType="RelativeToBandHeight" x="393" y="0" width="40" height="16" uuid="3c68e2ef-df60-4e55-b85b-4e789fe6d02c"/> - <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Top"/> - <textFieldExpression><![CDATA[($F{PRICEACTUAL}!=null)?$P{NUMBERFORMAT}.format($F{PRICEACTUAL}):new String(" ")]]></textFieldExpression> - </textField> - <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false"> - <reportElement key="textField-5" style="default" stretchType="RelativeToBandHeight" x="433" y="0" width="50" height="16" uuid="87b51bed-73d8-45fa-943e-3947941bf4e7"/> - <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Right" verticalAlignment="Top"/> - <textFieldExpression><![CDATA[($F{LINENETAMT}!=null)?$P{NUMBERFORMAT}.format($F{LINENETAMT}):new String(" ")]]></textFieldExpression> - </textField> - </frame> - <textField isStretchWithOverflow="true" isBlankWhenNull="false"> - <reportElement key="textField-8" style="default" stretchType="RelativeToBandHeight" x="263" y="0" width="80" height="16" uuid="494f46b4-c650-4656-954d-fae1a2682c32"/> - <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> - <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> - <bottomPen lineWidth="0.0" lineColor="#000000"/> - <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> - </box> - <textElement textAlignment="Left" verticalAlignment="Top"/> - <textFieldExpression><![CDATA[org.openbravo.erpCommon.utility.Utility.applyCountryDateFormat($F{NEEDBYDATE},$F{ORGANIZATIONID})]]></textFieldExpression> - </textField> - </band> - </detail> - <columnFooter> - <band splitType="Stretch"/> - </columnFooter> - <pageFooter> - <band splitType="Stretch"/> - </pageFooter> - <summary> - <band splitType="Stretch"/> - </summary> + WHERE M_REQUISITIONLINE.C_UOM_ID = C_UOM.C_UOM_ID + AND M_REQUISITIONLINE.M_REQUISITION_ID = $P{REQUISITION_ID} + ORDER BY M_REQUISITIONLINE.NEEDBYDATE, M_PRODUCT.NAME]]> + </queryString> + <field name="VALUE" class="java.lang.String"/> + <field name="NAME" class="java.lang.String"/> + <field name="QTY" class="java.math.BigDecimal"/> + <field name="UOMSYMBOL" class="java.lang.String"/> + <field name="LINENETAMT" class="java.math.BigDecimal"/> + <field name="PRICEACTUAL" class="java.math.BigDecimal"/> + <field name="NEEDBYDATE" class="java.util.Date"/> + <field name="ATTRIBUTE" class="java.lang.String"/> + <field name="ORGANIZATIONID" class="java.lang.String"/> + <variable name="AMOUNT_SUM" class="java.math.BigDecimal" resetType="Group" resetGroup="REQUISITION_ID" calculation="Sum"> + <variableExpression><![CDATA[$F{LINENETAMT}]]></variableExpression> + </variable> + <variable name="AMOUNT_SUM_1" class="java.math.BigDecimal" resetType="Group" resetGroup="REQUISITION_ID" calculation="Sum"> + <variableExpression><![CDATA[$F{LINENETAMT}]]></variableExpression> + </variable> + <group name="REQUISITION_ID"> + <groupExpression><![CDATA[$P{REQUISITION_ID}]]></groupExpression> + <groupHeader> + <band height="16" splitType="Stretch"> + <staticText> + <reportElement key="element-1" style="Detail_Header" x="0" y="0" width="50" height="16" uuid="7779509d-97bd-4190-afe8-beb39c30496b"/> + <box leftPadding="5"> + <pen lineWidth="0.0"/> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font pdfFontName="Helvetica-Bold"/> + </textElement> + <text><![CDATA[Ref.]]></text> + </staticText> + <staticText> + <reportElement key="element-3" style="Detail_Header" x="50" y="0" width="138" height="16" uuid="ada64ec7-62ac-4796-870d-4698657b65be"/> + <box leftPadding="5"> + <pen lineWidth="0.0"/> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"/> + <text><![CDATA[Product Name]]></text> + </staticText> + <staticText> + <reportElement key="element-4" style="Detail_Header" x="343" y="0" width="50" height="16" uuid="a07ab159-2013-4e69-8f52-ef5d0a189455"/> + <box leftPadding="5"> + <pen lineWidth="0.0"/> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"/> + <text><![CDATA[Qty.]]></text> + </staticText> + <staticText> + <reportElement key="element-5" style="Detail_Header" x="433" y="0" width="50" height="16" uuid="021099f1-85de-4edb-9832-dc917df84730"/> + <box leftPadding="5"> + <pen lineWidth="0.0"/> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"/> + <text><![CDATA[Amt.]]></text> + </staticText> + <staticText> + <reportElement key="element-6" style="Detail_Header" x="188" y="0" width="75" height="16" uuid="01b057dd-38eb-489c-8890-4f5eb3c8768c"/> + <box leftPadding="5"> + <pen lineWidth="0.0"/> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"/> + <text><![CDATA[Attribute]]></text> + </staticText> + <staticText> + <reportElement key="element-7" style="Detail_Header" x="393" y="0" width="40" height="16" uuid="ac892ae9-c953-45c7-a749-0d728cd12f0d"/> + <box leftPadding="5"> + <pen lineWidth="0.0"/> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Middle"/> + <text><![CDATA[Price]]></text> + </staticText> + <staticText> + <reportElement key="element-8" style="Detail_Header" x="263" y="0" width="80" height="16" uuid="2b97ccf6-3a1a-41b5-a689-0cf199a14175"/> + <box leftPadding="5"> + <pen lineWidth="0.0"/> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#FFFFFF"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font pdfFontName="Helvetica-Bold"/> + </textElement> + <text><![CDATA[Need by]]></text> + </staticText> + </band> + </groupHeader> + <groupFooter> + <band height="71" splitType="Stretch"> + <line> + <reportElement key="line" positionType="FixRelativeToBottom" x="0" y="0" width="483" height="1" forecolor="#000000" uuid="06741801-88ff-4798-81b9-12033ec8f539"/> + <graphicElement> + <pen lineWidth="0.25" lineStyle="Solid"/> + </graphicElement> + </line> + <staticText> + <reportElement key="staticText-2" style="Report_Data_Label" x="355" y="1" width="46" height="16" uuid="bd8d6529-8b2a-43a8-a57c-5f57f87bfb35"/> + <box leftPadding="5"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement> + <font size="10"/> + </textElement> + <text><![CDATA[Total:]]></text> + </staticText> + <textField pattern="" isBlankWhenNull="false"> + <reportElement key="textField" style="Total_Gray" x="401" y="1" width="82" height="16" uuid="4b895e91-ff0d-4b55-b24f-d837cbbfac05"/> + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#FFFFFF"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#FFFFFF"/> + </box> + <textElement textAlignment="Right"/> + <textFieldExpression><![CDATA[($V{AMOUNT_SUM}!=null)?$P{NUMBERFORMAT}.format($V{AMOUNT_SUM}):new String(" ")]]></textFieldExpression> + </textField> + <image isLazy="true"> + <reportElement x="30" y="10" width="50" height="50" uuid="f6a0a9f3-3ea8-4860-a22a-6272c176b967"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <imageExpression><![CDATA[org.openbravo.erpCommon.utility.Utility.showImage("EC29FCE500764FDF86263EC63091784A")]]></imageExpression> + </image> + </band> + </groupFooter> + </group> + <background> + <band splitType="Stretch"/> + </background> + <title> + <band splitType="Stretch"/> + </title> + <pageHeader> + <band splitType="Stretch"/> + </pageHeader> + <columnHeader> + <band splitType="Stretch"/> + </columnHeader> + <detail> + <band height="16" splitType="Stretch"> + <frame> + <reportElement key="frame-1" style="Detail_Line" stretchType="RelativeToBandHeight" x="0" y="0" width="483" height="16" uuid="5b0cd77f-dbce-4544-a6fc-9b4452c1c171"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> + <reportElement key="textField-1" style="default" stretchType="RelativeToBandHeight" x="0" y="0" width="50" height="16" uuid="6516ee69-21f4-4203-b1fa-6d7024814ffb"/> + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Top"/> + <textFieldExpression><![CDATA[$F{VALUE}]]></textFieldExpression> + </textField> + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> + <reportElement key="textField-3" style="default" stretchType="RelativeToBandHeight" x="50" y="0" width="138" height="16" uuid="a972de98-127e-4295-bad1-f0702aec8f62"/> + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement verticalAlignment="Top"/> + <textFieldExpression><![CDATA[$F{NAME}]]></textFieldExpression> + </textField> + <textField isStretchWithOverflow="true" isBlankWhenNull="true"> + <reportElement key="textField-6" style="default" stretchType="RelativeToBandHeight" x="188" y="0" width="75" height="16" uuid="4b9825f6-e2c3-4234-ba9e-f949e9465a6a"/> + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement verticalAlignment="Top"/> + <textFieldExpression><![CDATA[$F{ATTRIBUTE}]]></textFieldExpression> + </textField> + <textField isStretchWithOverflow="true" isBlankWhenNull="false"> + <reportElement key="textField-4" style="default" stretchType="RelativeToBandHeight" x="343" y="0" width="50" height="16" uuid="49c21581-18bd-4584-b4bf-f6361fd145c1"/> + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Top"/> + <textFieldExpression><![CDATA[($F{QTY}!=null)?$P{NUMBERFORMAT}.format($F{QTY})+" "+$F{UOMSYMBOL}:new String(" ")]]></textFieldExpression> + </textField> + <textField isStretchWithOverflow="true" isBlankWhenNull="false"> + <reportElement key="textField-7" style="default" stretchType="RelativeToBandHeight" x="393" y="0" width="40" height="16" uuid="3c68e2ef-df60-4e55-b85b-4e789fe6d02c"/> + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Top"/> + <textFieldExpression><![CDATA[($F{PRICEACTUAL}!=null)?$P{NUMBERFORMAT}.format($F{PRICEACTUAL}):new String(" ")]]></textFieldExpression> + </textField> + <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false"> + <reportElement key="textField-5" style="default" stretchType="RelativeToBandHeight" x="433" y="0" width="50" height="16" uuid="87b51bed-73d8-45fa-943e-3947941bf4e7"/> + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right" verticalAlignment="Top"/> + <textFieldExpression><![CDATA[($F{LINENETAMT}!=null)?$P{NUMBERFORMAT}.format($F{LINENETAMT}):new String(" ")]]></textFieldExpression> + </textField> + </frame> + <textField isStretchWithOverflow="true" isBlankWhenNull="false"> + <reportElement key="textField-8" style="default" stretchType="RelativeToBandHeight" x="263" y="0" width="80" height="16" uuid="494f46b4-c650-4656-954d-fae1a2682c32"/> + <box topPadding="2" leftPadding="2" bottomPadding="2" rightPadding="2"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Top"/> + <textFieldExpression><![CDATA[org.openbravo.erpCommon.utility.Utility.applyCountryDateFormat($F{NEEDBYDATE},$F{ORGANIZATIONID})]]></textFieldExpression> + </textField> + </band> + </detail> + <columnFooter> + <band splitType="Stretch"/> + </columnFooter> + <pageFooter> + <band splitType="Stretch"/> + </pageFooter> + <summary> + <band splitType="Stretch"/> + </summary> </jasperReport> issue36697.diff [^] (1,438 bytes) 2017-08-23 12:52 [Show Content] [Hide Content] diff --git a/src/org/openbravo/erpCommon/utility/Utility.java b/src/org/openbravo/erpCommon/utility/Utility.java --- a/src/org/openbravo/erpCommon/utility/Utility.java +++ b/src/org/openbravo/erpCommon/utility/Utility.java @@ -1991,6 +1991,27 @@ } /** + * Provides the image as a byte array. This method is intended to be used by Jasper reports as it + * takes care to close the DAL connection in order to avoid connection leaks in case it is invoked + * from a sub-report. + * + * @param id + * The id of the image to display + * @return The image requested + * @see #getImage(String) + */ + private static byte[] getImageForReport(String id) { + try { + return getImage(id); + } finally { + // Close the DAL connection used to retrieve the image with getImage(id) + // This is required if the method is invoked from a sub-report until issue + // https://issues.openbravo.com/view.php?id=30182 is fixed + OBDal.getInstance().commitAndClose(); + } + } + + /** * Provides the image as a byte array. These images are stored in the table AD_IMAGES as a BLOB * field. * @@ -2054,7 +2075,7 @@ * @see #getImage(String) */ public static BufferedImage showImage(String id) throws IOException { - return ImageIO.read(new ByteArrayInputStream(getImage(id))); + return ImageIO.read(new ByteArrayInputStream(getImageForReport(id))); } /** issue36697v2.diff [^] (2,645 bytes) 2017-08-23 13:20 [Show Content] [Hide Content] diff --git a/src/org/openbravo/erpCommon/utility/Utility.java b/src/org/openbravo/erpCommon/utility/Utility.java --- a/src/org/openbravo/erpCommon/utility/Utility.java +++ b/src/org/openbravo/erpCommon/utility/Utility.java @@ -1997,13 +1997,25 @@ * @param id * The id of the image to display * @return The image requested - * @see #getImage(String) */ public static byte[] getImage(String id) { + return getImage(id, false); + } + /** + * Provides the image as a byte array. These images are stored in the table AD_IMAGES as a BLOB + * field. + * + * @param id + * The id of the image to display + * @param doCommit + * A flag to force the commit of the DAL connection which is used to retrieve the image + * @return The image requested + */ + private static byte[] getImage(String id, boolean doCommit) { byte[] imageByte; try { - Image img = getImageObject(id); + Image img = getImageObject(id, doCommit); if (img == null) { imageByte = getBlankImage(); } else { @@ -2029,9 +2041,22 @@ * @param id * The id of the image to display * @return The image requested - * @see #getImage(String) */ public static Image getImageObject(String id) { + return getImageObject(id, false); + } + + /** + * Provides the image as an image object. These images are stored in the table AD_IMAGES as a BLOB + * field. + * + * @param id + * The id of the image to display + * @param doCommit + * A flag to force the commit of the DAL connection which is used to retrieve the image + * @return The image requested + */ + private static Image getImageObject(String id, boolean doCommit) { Image img = null; OBContext.setAdminMode(); try { @@ -2040,6 +2065,9 @@ log4j.error("Could not load image from database: " + id, e); } finally { OBContext.restorePreviousMode(); + if (doCommit) { + OBDal.getInstance().commitAndClose(); + } } return img; } @@ -2054,7 +2082,10 @@ * @see #getImage(String) */ public static BufferedImage showImage(String id) throws IOException { - return ImageIO.read(new ByteArrayInputStream(getImage(id))); + // Use getImage(id, true) to close the DAL connection once the image has been retrieved. + // This is required to avoid connection leaks when invoking this method from a sub-report. + // This is needed until issue https://issues.openbravo.com/view.php?id=30182 is fixed. + return ImageIO.read(new ByteArrayInputStream(getImage(id, true))); } /** | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||||||||||||||||
|
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 |