Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0004681 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 07. Sales management | minor | always | 2008-08-22 12:04 | 2009-02-18 18:44 | |||
Reporter | dalsasua | View Status | public | |||||
Assigned To | pheenan | |||||||
Priority | normal | Resolution | duplicate | Fixed in Version | ||||
Status | closed | Fix in branch | pi | Fixed in SCM revision | ||||
Projection | none | ETA | none | Target Version | 2.35 | |||
OS | Linux 32 bit | Database | PostgreSQL | Java version | tecnicia14 | |||
OS Version | ubuntu hardy | Database version | tecnicia14 | Ant version | tecnicia14 | |||
Product Version | 2.35 | SCM revision | 6486 | |||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0004681: Prepaid sales orders crashes when completing in postgres | |||||||
Description | On r2.35 branch, rev. 6486, prepaid sales orders crashes when completing in postgres | |||||||
Steps To Reproduce | Create a prepaid sales order, add a line, and press complete. 11:44:16 [ajp-8009-5] ERROR org.openbravo.erpCommon.utility.ExecuteQuery - SQL error in query: SELECT SUM(Line) AS TOTAL FROM C_OrderLine left join (SELECT M_Product_ID, Name FROM M_Product) td1 on C_OrderLine.M_Product_ID = td1.M_Product_ID left join (SELECT C_UOM_ID, Name FROM C_UOM) td2 on C_OrderLine.C_UOM_ID = td2.C_UOM_ID left join (SELECT AD_Language, C_UOM_ID, Name FROM C_UOM_Trl) td_trl3 on td2.C_UOM_ID = td_trl3.C_UOM_ID AND td_trl3.AD_Language = ? left join (SELECT C_Tax_ID, Name FROM C_Tax) td4 on C_OrderLine.C_Tax_ID = td4.C_Tax_ID left join (SELECT AD_Language, C_Tax_ID, Name FROM C_Tax_Trl) td_trl5 on td4.C_Tax_ID = td_trl5.C_Tax_ID AND td_trl5.AD_Language = ? WHERE C_OrderLine.AD_Client_ID IN (0,1000000) AND C_OrderLine.AD_Org_ID IN (0,1000000) AND C_OrderLine.C_Order_ID = ? AND C_OrderLine.C_OrderLine_ID IN ('1000066') ORDER BY C_OrderLine.Line ASC, C_OrderLine.C_OrderLine_IDException:org.postgresql.util.PSQLException: ERROR: column "c_orderline.line" must appear in the GROUP BY clause or be used in an aggregate function | |||||||
Tags | PostgreSQL | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0008890) cromero (reporter) 2008-09-05 11:45 |
The problem in PostgreSQL is that we are trying to catch a code exception 'DATA_EXCEPTION' when we should use 'RAISE_EXCEPTION' ''RAISE EXCEPTION presently always generates the same SQLSTATE code, P0001, no matter what message it is invoked with. It is possible to trap this exception with EXCEPTION ... WHEN RAISE_EXCEPTION THEN ... but there is no way to tell one RAISE from another.'' So, now we are using exceptions like NO_DATA_FOUND (Oracle) that it is translated to DATA_EXCEPTION (PostgreSQL), but it does not work since we are trying to catch an exception code that is never thrown. What we should do in Postgres would be something like: RAISE EXCEPTION '%', 'ORACLE_EXCEPTION_CODE'; EXCEPTION WHEN RAISE_EXCEPTION THEN --OBTG:ORACLE_EXCEPTION_CODE -- |
(0010156) rafaroda (developer) 2008-11-11 11:59 |
This bug still reproduces in the trunk. It seems to be an odd behavior in the messaging of C_OrderPOST1 procedure [1]. See lines 175-177 (in the XML file): IF (v_DocSubTypeSO='PR' AND v_invoicerule <> 'I') THEN RAISE_APPLICATION_ERROR(-20000, '@PrepayMustImmediate@'); END IF; [1] https://dev.openbravo.com/websvn/openbravo/trunk/src-db/database/model/functions/C_ORDER_POST1.xml [^] |
Issue History | |||
Date Modified | Username | Field | Change |
2008-08-22 12:04 | dalsasua | New Issue | |
2008-08-22 12:04 | dalsasua | Assigned To | => cromero |
2008-08-22 12:04 | dalsasua | sf_bug_id | 0 => 2067129 |
2008-08-22 12:04 | dalsasua | Regression testing | => No |
2008-09-01 12:25 | psarobe | Status | new => scheduled |
2008-09-01 12:25 | psarobe | fix_in_branch | => trunk |
2008-09-03 18:25 | cromero | Status | scheduled => feedback |
2008-09-03 18:25 | cromero | Status | feedback => scheduled |
2008-09-05 11:25 | cromero | Tag Attached: PostgreSQL | |
2008-09-05 11:45 | cromero | Note Added: 0008890 | |
2008-09-05 11:45 | cromero | Assigned To | cromero => marvintm |
2008-11-05 13:35 | cromero | Assigned To | marvintm => AinhoaPagola |
2008-11-05 13:36 | cromero | Status | scheduled => closed |
2008-11-05 13:36 | cromero | Resolution | open => unable to reproduce |
2008-11-11 11:59 | rafaroda | Assigned To | AinhoaPagola => gorkaion |
2008-11-11 11:59 | rafaroda | Status | closed => new |
2008-11-11 11:59 | rafaroda | Resolution | unable to reproduce => open |
2008-11-11 11:59 | rafaroda | Note Added: 0010156 | |
2008-11-11 12:00 | rafaroda | Status | new => scheduled |
2008-11-25 17:02 | rafaroda | Assigned To | gorkaion => Dowid |
2008-12-09 14:30 | PavelPonomarev | Assigned To | Dowid => pheenan |
2009-02-18 18:44 | AinhoaPagola | Relationship added | duplicate of 0007262 |
2009-02-18 18:44 | AinhoaPagola | Status | scheduled => closed |
2009-02-18 18:44 | AinhoaPagola | Duplicate ID | 0 => 7262 |
2009-02-18 18:44 | AinhoaPagola | Resolution | open => duplicate |
Copyright © 2000 - 2009 MantisBT Group |