Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0024174 | Openbravo ERP | A. Platform | public | 2013-06-24 10:28 | 2013-07-16 14:26 |
|
Reporter | jecharri | |
Assigned To | shankarb | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | pi | |
Target Version | 3.0MP26 | Fixed in Version | 3.0MP25 | |
Merge Request Status | |
Review Assigned To | AugustoMauch |
OBNetwork customer | |
Web browser | Google Chrome |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0024174: Little problem with Oracle messages in the ERP |
Description | Little problem with Oracle messages in the ERP
Some times oracle messages are not clear
One example
MY MESSAGE\\nORA-06512: en "TAD.C_ORDERLINE_TRG", línea 48\\nORA-04088: error durante la ejecución del disparador 'TAD.C_ORDERLINE_TRG' |
Steps To Reproduce | -Working in Oracle, go to c_order_post and add the following line after line "Begin --BODY":
update c_orderline set isactive = 'N' where c_order_id = v_Record_ID;
-modify c_orderline_trg with:
IF AD_isTriggerEnabled()='N' THEN RETURN;
End If;
RAISE_APPLICATION_ERROR(-20000, 'MY MESSAGE');
-finally try to complete and order in the ERP |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0024217 | 3.0MP27 | closed | pramakrishnan | Little problem with Oracle messages in the ERP |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2013-06-24 10:28 | jecharri | New Issue | |
2013-06-24 10:28 | jecharri | Assigned To | => AugustoMauch |
2013-06-24 10:28 | jecharri | Web browser | => Google Chrome |
2013-06-24 10:28 | jecharri | Modules | => Core |
2013-06-24 10:28 | jecharri | Resolution time | => 1374530400 |
2013-06-24 10:28 | jecharri | Triggers an Emergency Pack | => No |
2013-06-27 05:06 | shankarb | Assigned To | AugustoMauch => shankarb |
2013-06-27 05:07 | shankarb | Review Assigned To | => AugustoMauch |
2013-06-27 05:07 | shankarb | Web browser | Google Chrome => Google Chrome |
2013-06-27 05:07 | shankarb | Issue Monitored: AugustoMauch | |
2013-06-27 05:14 | hgbot | Checkin | |
2013-06-27 05:14 | hgbot | Note Added: 0059690 | |
2013-06-27 05:14 | hgbot | Status | new => resolved |
2013-06-27 05:14 | hgbot | Resolution | open => fixed |
2013-06-27 05:14 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/ac7af24d4f0baeda8fe9aa0e4284caca7460d16d [^] |
2013-06-27 12:56 | hudsonbot | Checkin | |
2013-06-27 12:56 | hudsonbot | Note Added: 0059705 | |
2013-06-27 16:18 | AugustoMauch | Relationship added | related to 0024217 |
2013-06-27 16:56 | shuehner | Note Added: 0059714 | |
2013-06-28 10:07 | AugustoMauch | Note Added: 0059722 | |
2013-07-01 10:12 | AugustoMauch | Note Added: 0059789 | |
2013-07-01 10:12 | AugustoMauch | Status | resolved => closed |
2013-07-01 10:12 | AugustoMauch | Fixed in Version | => 3.0MP25 |
2013-07-01 10:15 | AugustoMauch | Note Added: 0059790 | |
2013-07-03 07:32 | hgbot | Checkin | |
2013-07-03 07:32 | hgbot | Note Added: 0059824 | |
2013-07-03 09:09 | hgbot | Checkin | |
2013-07-03 09:09 | hgbot | Note Added: 0059825 | |
2013-07-16 14:26 | hudsonbot | Checkin | |
2013-07-16 14:26 | hudsonbot | Note Added: 0060015 | |
2013-07-16 14:26 | hudsonbot | Checkin | |
2013-07-16 14:26 | hudsonbot | Note Added: 0060016 | |
Notes |
|
(0059690)
|
hgbot
|
2013-06-27 05:14
|
|
Repository: erp/devel/pi
Changeset: ac7af24d4f0baeda8fe9aa0e4284caca7460d16d
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Jun 27 08:40:41 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/ac7af24d4f0baeda8fe9aa0e4284caca7460d16d [^]
Fixes Issue 0024174: Little problem with Oracle messages in the ERP
The first line of the oracle error stack contains meaningful error message.
Added delimiter to the indexOf method to get the first line.
Also there are unwanted backslashes because the new line is rendered as \\\n, removed them.
---
M src/org/openbravo/erpCommon/utility/ErrorTextParserORACLE.java
---
|
|
|
|
|
|
|
That parser has more or less good testing coverage via the junit tests in the ErrorTextParserTest.java file.
I think it makes sense to add another test to this which verifies the correct behvaior.
If you check that java file you will see that it does some sql-action (i.e. insert sql causing a duplicate value for a column in a uniqe constraint).
Then the test continues to capture the sqlException to get the error message (String) thrown by the database.
Then it passes the string to the ErrorTextParser framework and compares the output (String shown to the user) with the expected value.
As the ErrorTextParser on high level just transforms String (db excpetion) to String (message for user) testing it with a junit test is quite easy. |
|
|
|
Code review done. This issue will be closed when the test is updated. |
|
|
|
Code reviewed and verified in pi@f971af045df2 |
|
|
|
The updated Junit test will be included in MP26 |
|
|
(0059824)
|
hgbot
|
2013-07-03 07:32
|
|
Repository: erp/devel/pi
Changeset: ba49b0115f3390fac390da1d0b9665a6b13a9b02
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Jul 03 11:02:12 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/ba49b0115f3390fac390da1d0b9665a6b13a9b02 [^]
Related to Issue 24174 : Added test case for checking message parsing in Oracle.
Added test case to check that only the error message is displayed and not the whole error stack.
---
M src-test/org/openbravo/test/system/ErrorTextParserTest.java
---
|
|
|
(0059825)
|
hgbot
|
2013-07-03 09:09
|
|
Repository: erp/devel/pi
Changeset: 4db5ecf6004c8958e7bc38d510290d8a3bca3edb
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Jul 03 12:38:48 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/4db5ecf6004c8958e7bc38d510290d8a3bca3edb [^]
Related to Issue 24174: Backed out changeset ba49b0115f33
Backed out changeset as it fails the automated tests.
---
M src-test/org/openbravo/test/system/ErrorTextParserTest.java
---
|
|
|
|
|
|
|
|