Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0025219Openbravo ERPA. Platformpublic2013-11-26 18:092013-11-28 19:57
gorkaion 
alostale 
urgentmajoralways
closedfixed 
20Gentoo
3.0MP29.1 
3.0MP30 
alostale
Core
No
0025219: XSQL in PG not ready for procedures with 2 or more out parameters
The ReservationUtils.reallocateStock() method calls a stored procedure with 2 out parameters. This method fails when using postgresql.

There are 2 utility methods to call stored procedures from java:
Xsql: fails in postgresql with 2 or more out parameters
CallStoredProcedure: fails in any database with 2 or more parameters.

As xsql is a legacy process CallStoredProcedure should be adapted to allow 2 or more out parameters.
Modify ReservationUtils.reallocateStock() method to use CallStoredProcedure.call instead of xsql method.

Create a java process that uses this method.

There is a process in Warehouse Picking module (version 1.4.1 or newer) that uses this method. Ping me for details on this module to reproduce the error using it.
Modify ReservationUtils.reallocateStock() to use CallStoredProcedure.
Modify CallStoredProcedure.call() to allow 2 or more out parameters.
No tags attached.
diff xsqloutparameter.diff (1,088) 2013-11-26 18:48
https://issues.openbravo.com/file_download.php?file_id=6519&type=bug
Issue History
2013-11-26 18:09gorkaionNew Issue
2013-11-26 18:09gorkaionAssigned To => AugustoMauch
2013-11-26 18:09gorkaionModules => Core
2013-11-26 18:09gorkaionTriggers an Emergency Pack => No
2013-11-26 18:48gorkaionNote Added: 0062385
2013-11-26 18:48gorkaionFile Added: xsqloutparameter.diff
2013-11-27 11:06alostaleAssigned ToAugustoMauch => alostale
2013-11-27 11:07alostaleNote Added: 0062397
2013-11-27 11:07alostaleSummaryCallStoredProcedure not ready for procedures with 2 or more out parameters => XSQL in PG not ready for procedures with 2 or more out parameters
2013-11-27 11:20hgbotCheckin
2013-11-27 11:20hgbotNote Added: 0062399
2013-11-27 11:20hgbotStatusnew => resolved
2013-11-27 11:20hgbotResolutionopen => fixed
2013-11-27 11:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/758083712c6440637a7314822213f6ede6afc9ff [^]
2013-11-27 11:20alostaleNote Added: 0062400
2013-11-27 11:20alostaleReview Assigned To => alostale
2013-11-27 11:20alostaleStatusresolved => closed
2013-11-27 11:20alostaleFixed in Version => 3.0MP30
2013-11-28 19:57hudsonbotCheckin
2013-11-28 19:57hudsonbotNote Added: 0062464

Notes
(0062385)
gorkaion   
2013-11-26 18:48   
The xsql case can be adapted with the attached patch. Note that the patch has not been properly tested.
(0062397)
alostale   
2013-11-27 11:07   
Applying proposed patch that fixes xsql instead of CallStoredProcedure
(0062399)
hgbot   
2013-11-27 11:20   
Repository: erp/devel/pi
Changeset: 758083712c6440637a7314822213f6ede6afc9ff
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Nov 27 11:18:18 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/758083712c6440637a7314822213f6ede6afc9ff [^]

fixed bug 25219: support for more than 1 out param in PG xsql for stored procs

---
M src-core/src/org/openbravo/database/RDBMSIndependent.java
---
(0062400)
alostale   
2013-11-27 11:20   
Tested with existent xsql calls to procedures with 1 and more out params
(0062464)
hudsonbot   
2013-11-28 19:57   
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/ce703e5082ac [^]

Maturity status: Test