Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0028909 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2015-02-10 17:17 | 2016-03-08 20:36 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | marvintm | |||||||
Priority | high | Resolution | duplicate | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 32 bit | Database | PostgreSQL | Java version | 1.6.0_18 | |||
OS Version | Community Appliance | Database version | 8.3.9 | Ant version | 1.7.1 | |||
Product Version | SCM revision | |||||||
Review Assigned To | Orekaria | |||||||
Regression level | Automated tests | |||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0028909: can't create orders in Oracle | |||||||
Description | OrderLoader fails in Oracle because of incorrect invocation to M_GET_STOCK_PARAM procedure. Current code invokes this procedure as a function. In Oracle CallStoredProcedure can be used to invoke functions ("select function() from dual") and procedures ("call procedure()"), based on its returnResults parameter. Note this only affects Oracle because PostgreSQL doesn't differentiate functions and procedures. Currently M_GET_STOCK_PARAM, which is a procedure with output parameters is being invoked as a function, that's the reason the exception is thrown. | |||||||
Steps To Reproduce | . in oracle and Web POS . in OrderLoader.java the called to M_GET_STOCK_PARAM procedure: error is returned: Caused by: java.lang.IllegalStateException: java.sql.SQLSyntaxErrorException: ORA-00904: "M_GET_STOCK_PARAM": invalid identifier [junit] [junit] at org.openbravo.service.db.CallStoredProcedure.call(CallStoredProcedure.java:142) [junit] at org.openbravo.retail.posterminal.OrderLoader.callProcessGetStock(OrderLoader.java:1795) [junit] at org.openbravo.retail.posterminal.OrderLoader.createShipmentLines(OrderLoader.java:860) [junit] at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:243) | |||||||
Proposed Solution | Possible solutions: -Invoke it as a procedure. In this case, output parameters will not be retrieved. Looking at the current code they are not used anyway. Note in this case output paramters are required to be passed as parameters in Oracle but not in PG. -Use a CallableStatement. In this way it is possible to have the same code both for Oracle and PG. To do in this way it is necessary to indicate which are the output parameters. See attached test cases implementing different approaches both for PG and ORA. | |||||||
Tags | No tags attached. | |||||||
Attached Files | StoredProcedure.java [^] (4,872 bytes) 2015-02-10 17:26 | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||
|
Notes | |
(0075241) hgbot (developer) 2015-03-06 11:32 |
Repository: erp/devel/pi Changeset: ab393536c4bced9b793ae7c0672c95cdc26b1a07 Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com> Date: Fri Mar 06 11:31:38 2015 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/ab393536c4bced9b793ae7c0672c95cdc26b1a07 [^] Related to issue 28909 can't create orders in Oracle. Created StockUtils class to enable calls to M_GET_STOCK_PARAM procedure getting out params H : Enter commit message. Lines beginning with 'HG:' are removed. --- A src/org/openbravo/materialmgmt/CSResponseGetStockParam.java A src/org/openbravo/materialmgmt/StockUtils.java A src/org/openbravo/materialmgmt/StockUtils_data.xsql --- |
(0075258) hgbot (developer) 2015-03-06 16:52 |
Repository: erp/devel/pi Changeset: e20da585bb7ef4e3d0c1a280b66f5d997e553f45 Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com> Date: Fri Mar 06 16:52:17 2015 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/e20da585bb7ef4e3d0c1a280b66f5d997e553f45 [^] Related to issue 28909 Change variable definition to public to be able to retrieve the value --- M src/org/openbravo/materialmgmt/CSResponseGetStockParam.java --- |
(0075332) hudsonbot (developer) 2015-03-09 17: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/ef8a16dd11b3 [^] Maturity status: Test |
(0075333) hudsonbot (developer) 2015-03-09 17: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/ef8a16dd11b3 [^] Maturity status: Test |
(0084832) Orekaria (administrator) 2016-03-08 20:36 |
Fixed in 29180 |
Issue History | |||
Date Modified | Username | Field | Change |
2015-02-10 17:17 | alostale | New Issue | |
2015-02-10 17:17 | alostale | Assigned To | => AugustoMauch |
2015-02-10 17:17 | alostale | Modules | => Core |
2015-02-10 17:17 | alostale | Regression level | => Automated tests |
2015-02-10 17:17 | alostale | Triggers an Emergency Pack | => No |
2015-02-10 17:17 | alostale | Issue generated from | 0028875 |
2015-02-10 17:18 | alostale | Project | Openbravo ERP => Retail Modules |
2015-02-10 17:18 | alostale | Assigned To | AugustoMauch => marvintm |
2015-02-10 17:18 | alostale | Category | A. Platform => Web POS |
2015-02-10 17:19 | alostale | Relationship added | related to 0028875 |
2015-02-10 17:25 | alostale | Description Updated | View Revisions |
2015-02-10 17:25 | alostale | Proposed Solution updated | |
2015-02-10 17:26 | alostale | File Added: StoredProcedure.java | |
2015-03-06 11:22 | eduardo_Argal | Status | new => scheduled |
2015-03-06 11:22 | eduardo_Argal | Assigned To | marvintm => eduardo_Argal |
2015-03-06 11:28 | eduardo_Argal | Assigned To | eduardo_Argal => marvintm |
2015-03-06 11:32 | hgbot | Checkin | |
2015-03-06 11:32 | hgbot | Note Added: 0075241 | |
2015-03-06 16:52 | hgbot | Checkin | |
2015-03-06 16:52 | hgbot | Note Added: 0075258 | |
2015-03-09 09:43 | malsasua | Relationship added | duplicate of 0029180 |
2015-03-09 17:49 | hudsonbot | Checkin | |
2015-03-09 17:49 | hudsonbot | Note Added: 0075332 | |
2015-03-09 17:49 | hudsonbot | Checkin | |
2015-03-09 17:49 | hudsonbot | Note Added: 0075333 | |
2016-03-08 20:36 | Orekaria | Review Assigned To | => Orekaria |
2016-03-08 20:36 | Orekaria | Note Added: 0084832 | |
2016-03-08 20:36 | Orekaria | Status | scheduled => closed |
2016-03-08 20:36 | Orekaria | Resolution | open => duplicate |
Copyright © 2000 - 2009 MantisBT Group |