Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036444 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2017-07-07 11:16 | 2017-09-21 16:49 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR17Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 36b24dd5e2ff | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | shuehner | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036444: SqlC generated code hides stack traces in case of error | |||||||
Description | When a query executed by a generated SqlC method fails, an error is logged but there is no way to see stack trace of where it occurred. | |||||||
Steps To Reproduce | - Execute ErrorTextParserTest -> Check output: There are output lines like following that do not include stack traces: 14768 [main] ERROR org.openbravo.test.system.ErrorTextParserTestData - SQL error in query: DELETE FROM AD_CLIENT WHERE AD_CLIENT_ID = ?Exception:org.postgresql.util.PSQLException: ERROR: update or delete on table "ad_client" violates foreign key constraint "ad_alert_ad_client" on table "ad_alert" Detail: Key (ad_client_id)=(0) is still referenced from table "ad_alert". | |||||||
Proposed Solution | Statements can fail due to: 1. Technical reasons 2. Functional ones (ie. trying to insert/update prevented by a constraint/trigger) In general for 2nd cases stack traces are not interesting and would pollute logs whereas stack traces for 1st cases would be interesting to help debugging. Differentiating those cases in code is not possible/easy. As a compromise solution: - By default stack traces won't be logged, as currently is done - In case logger is set to debug level stack trace will be logged | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||||||||||||||||
|
Notes | |
(0097944) hgbot (developer) 2017-07-07 12:33 |
Repository: erp/devel/pi Changeset: 36b24dd5e2ff0d8e544868ef18900f92862e22ff Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri Jul 07 12:28:04 2017 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/36b24dd5e2ff0d8e544868ef18900f92862e22ff [^] fixed bug 36444: SqlC generates code hides stack traces in case of error Show stack traces when error occurs in sqlc methods. By default it is still not shown, but it can be enabled by setting DEBUG log lovel. --- M src-core/src/org/openbravo/data/Sqlc.java M src-test/src/org/openbravo/test/base/TestLogAppender.java M src-test/src/org/openbravo/test/system/ErrorTextParserTest.java --- |
(0097961) hgbot (developer) 2017-07-10 08:50 |
Repository: erp/devel/pi Changeset: 6203c605f7397ef953cb750d930fa143f940da36 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Mon Jul 10 08:49:51 2017 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/6203c605f7397ef953cb750d930fa143f940da36 [^] related with bug 36444: make optional to log stack traces in tests In test infrastructure is now optional (and disabled by default) to log stack traces. This restores the previous behavior where they were never logged. --- M src-test/src/org/openbravo/test/base/OBBaseTest.java M src-test/src/org/openbravo/test/base/TestLogAppender.java M src-test/src/org/openbravo/test/system/ErrorTextParserTest.java --- |
(0098274) shuehner (administrator) 2017-07-31 13:06 |
Tested & reviewed. Test done via running & checking the junit testcase which has been added to test the change. |
(0099246) hudsonbot (developer) 2017-09-21 16: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/9750b78d3e5c [^] Maturity status: Test |
(0099251) hudsonbot (developer) 2017-09-21 16: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/9750b78d3e5c [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2017-07-07 11:16 | alostale | New Issue | |
2017-07-07 11:16 | alostale | Assigned To | => platform |
2017-07-07 11:16 | alostale | Modules | => Core |
2017-07-07 11:16 | alostale | Triggers an Emergency Pack | => No |
2017-07-07 11:16 | alostale | Relationship added | related to 0036429 |
2017-07-07 11:17 | alostale | Relationship added | blocks 0036162 |
2017-07-07 11:22 | alostale | Review Assigned To | => shuehner |
2017-07-07 12:29 | alostale | Assigned To | platform => alostale |
2017-07-07 12:33 | hgbot | Checkin | |
2017-07-07 12:33 | hgbot | Note Added: 0097944 | |
2017-07-07 12:33 | hgbot | Status | new => resolved |
2017-07-07 12:33 | hgbot | Resolution | open => fixed |
2017-07-07 12:33 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/36b24dd5e2ff0d8e544868ef18900f92862e22ff [^] |
2017-07-07 12:38 | alostale | Summary | SqlC generates code hides stack traces in case of error => SqlC generated code hides stack traces in case of error |
2017-07-10 08:50 | hgbot | Checkin | |
2017-07-10 08:50 | hgbot | Note Added: 0097961 | |
2017-07-31 13:06 | shuehner | Note Added: 0098274 | |
2017-07-31 13:06 | shuehner | Status | resolved => closed |
2017-07-31 13:06 | shuehner | Fixed in Version | => 3.0PR17Q4 |
2017-09-21 16:49 | hudsonbot | Checkin | |
2017-09-21 16:49 | hudsonbot | Note Added: 0099246 | |
2017-09-21 16:49 | hudsonbot | Checkin | |
2017-09-21 16:49 | hudsonbot | Note Added: 0099251 | |
2017-11-06 08:31 | alostale | Relationship added | has duplicate 0011261 |
Copyright © 2000 - 2009 MantisBT Group |