Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036444
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2017-07-07 11:162017-09-21 16:49
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revision36b24dd5e2ff
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toshuehner
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036444: SqlC generated code hides stack traces in case of error

DescriptionWhen 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 SolutionStatements 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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0036429 closedshuehner SqlC generates code using printStackTrace which should not be used 
has duplicate feature request 0011261 closedplatform In Sqlc generated code include stack trace in error logs 
blocks design defect 0036162 acknowledgedTriage Platform Base clean up openbravo.log 

-  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
Powered by Mantis Bugtracker