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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0019164
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2011-11-24 10:012011-11-30 12:30
ReportermaiteView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision77352f416244
ProjectionnoneETAnoneTarget Version3.0MP6
OSAnyDatabasePostgreSQLJava version
OS VersionDatabase versionAnt version
Product Version3.0MP5.1SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0019164: Error when "CallStoredProcedure" receives empty string ("") in PostgreSQL

DescriptionError when "CallStoredProcedure" receives empty string ("") in PostgreSQL as, in this case, it is set to NVARCHAR which is not supported type in PostgreSQL (http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/Concepts/DB/Tables#Supported_Column_Data_types [^])
Steps To Reproduce1. Schedule FIN_PaymentMonitorProcess background process in a migrated environment with old invoices (which have debt_payments associated)

In that case, method "getMigratedPaymentStatus" will call to "FIN_Utility.isPaymentConfirmed" method (with second parameter set to null), which will try to execute "APRM_ISPAYMENTCONFIRMED" procedure.
Method "Call" inside "CallStoredProcedure" class in line 97 will perform:
ps.setNull(sqlIndex, Types.NVARCHAR);

That causes exception in PostgreSQL
Proposed Solutionsubstituting line 97 in "CallStoredProcedure" by:
ps.setNull(sqlIndex, Types.VARCHAR);
error is not obtained
TagsRegression
Attached Files? file icon org.openbravo.issue19164-0.0.0.obx [^] (7,791 bytes) 2011-11-24 16:02

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0018277 closedgorkaion APR Payment monitor background process should update paid and outstanding amounts 
has duplicate defect 0019162 closedalostale CallStoredProcedure crashes if callling with NULL parameters 

-  Notes
(0043151)
dmitry_mezentsev (developer)
2011-11-24 12:37

FR 18227 made this bug visible.
(0043156)
alostale (manager)
2011-11-24 13:26

It can also be reproduced installing attached module and executing dummy process from quick launch.
(0043157)
alostale (manager)
2011-11-24 13:28
edited on: 2011-11-24 16:03

Test plan:
-Install org.openbravo.issue19164 module and execute dummy process


Regression test:
-Do execute the test plan in Oracle and PostgreSQL, this fix solves a PostgreSQL specific issue, verify it also works on Oracle.
-Even not supported in Oracle and modules, in postgreSQL it is possible to overload a function having the same number of parameters but of different types, check it continues working if types are passed correctly.

(0043178)
hgbot (developer)
2011-11-24 16:05

Repository: erp/devel/pi
Changeset: 77352f416244fd98a2923fedf7eecdf4d0f03f81
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Nov 24 16:04:52 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/77352f416244fd98a2923fedf7eecdf4d0f03f81 [^]

fixed bug 19164: PG error invoking PL functions with null parameters

---
M src/org/openbravo/service/db/CallStoredProcedure.java
---
(0043197)
marvintm (developer)
2011-11-24 19:30

Reviewed the diff and tested a process both in Oracle and PostgreSQL.
(0043199)
maite (developer)
2011-11-25 08:21

Verified that FIN_PaymentMonitorProcess background process works
(0043438)
hudsonbot (developer)
2011-11-30 12:30

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/01809c7b3135 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2011-11-24 10:01 maite New Issue
2011-11-24 10:01 maite Assigned To => alostale
2011-11-24 10:01 maite Modules => Core
2011-11-24 10:10 maite Issue Monitored: networkb
2011-11-24 12:36 dmitry_mezentsev Priority urgent => immediate
2011-11-24 12:36 dmitry_mezentsev Tag Attached: Regression
2011-11-24 12:36 dmitry_mezentsev Relationship added related to 0018277
2011-11-24 12:37 dmitry_mezentsev Note Added: 0043151
2011-11-24 12:49 alostale Relationship added has duplicate 0019162
2011-11-24 12:49 shuehner Issue Monitored: shuehner
2011-11-24 13:26 alostale File Added: org.openbravo.issue19164-0.0.0.obx
2011-11-24 13:26 alostale Note Added: 0043156
2011-11-24 13:28 alostale Note Added: 0043157
2011-11-24 14:36 icematrix3k Issue Monitored: icematrix3k
2011-11-24 15:54 maite version => 3.0MP5.1
2011-11-24 16:01 alostale File Deleted: org.openbravo.issue19164-0.0.0.obx
2011-11-24 16:02 alostale File Added: org.openbravo.issue19164-0.0.0.obx
2011-11-24 16:03 alostale Note Edited: 0043157 View Revisions
2011-11-24 16:05 hgbot Checkin
2011-11-24 16:05 hgbot Note Added: 0043178
2011-11-24 16:05 hgbot Status new => resolved
2011-11-24 16:05 hgbot Resolution open => fixed
2011-11-24 16:05 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/77352f416244fd98a2923fedf7eecdf4d0f03f81 [^]
2011-11-24 19:30 marvintm Note Added: 0043197
2011-11-24 19:30 marvintm Status resolved => closed
2011-11-25 08:21 maite Note Added: 0043199
2011-11-30 12:30 hudsonbot Checkin
2011-11-30 12:30 hudsonbot Note Added: 0043438


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker