Openbravo Issue Tracking System - Retail Modules | |||||||||||||||||||||
View Issue Details | |||||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||||
0028909 | Retail Modules | Web POS | public | 2015-02-10 17:17 | 2016-03-08 20:36 | ||||||||||||||||
Reporter | alostale | ||||||||||||||||||||
Assigned To | marvintm | ||||||||||||||||||||
Priority | high | Severity | major | Reproducibility | always | ||||||||||||||||
Status | closed | Resolution | duplicate | ||||||||||||||||||
Platform | OS | 20 | OS Version | Community Appliance | |||||||||||||||||
Product Version | |||||||||||||||||||||
Target Version | Fixed in Version | ||||||||||||||||||||
Merge Request Status | |||||||||||||||||||||
Review Assigned To | Orekaria | ||||||||||||||||||||
OBNetwork customer | |||||||||||||||||||||
Support ticket | |||||||||||||||||||||
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. | ||||||||||||||||||||
Additional Information | |||||||||||||||||||||
Tags | No tags attached. | ||||||||||||||||||||
Relationships |
| ||||||||||||||||||||
Attached Files | StoredProcedure.java (4,872) 2015-02-10 17:26 https://issues.openbravo.com/file_download.php?file_id=7780&type=bug | ||||||||||||||||||||
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 | bug_revision_view_page.php?rev_id=7655#r7655 | ||||||||||||||||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|