Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0036429 | Openbravo ERP | A. Platform | public | 2017-07-06 12:26 | 2017-09-21 16:49 |
|
Reporter | shuehner | |
Assigned To | shuehner | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR17Q4 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0036429: SqlC generates code using printStackTrace which should not be used |
Description | This issue is part of getting rid of bad logging especially by not using printStackTrace as it is logged on stdout (catalina.out) without timestamp of context information.
SqlC current generates printStackTrace in the code in a catch block when an exception is raised while closing the statement/connection.
This issue will change that code to use the standard/proper log4j call.
Also based on feedback from ALO it adds context information (full sql statement) to make debugging easier if that case should happen. |
Steps To Reproduce | Check code generated from xsql and notice it using printStackTrace.
|
Proposed Solution | - |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | design defect | 0036162 | | acknowledged | Triage Platform Base | clean up openbravo.log | related to | defect | 0036444 | | closed | alostale | SqlC generated code hides stack traces in case of error |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2017-07-06 12:26 | shuehner | New Issue | |
2017-07-06 12:26 | shuehner | Assigned To | => shuehner |
2017-07-06 12:26 | shuehner | Modules | => Core |
2017-07-06 12:26 | shuehner | Triggers an Emergency Pack | => No |
2017-07-06 12:26 | shuehner | Relationship added | related to 0036162 |
2017-07-06 12:28 | shuehner | Note Added: 0097905 | |
2017-07-06 16:01 | hgbot | Checkin | |
2017-07-06 16:01 | hgbot | Note Added: 0097919 | |
2017-07-06 16:01 | hgbot | Status | new => resolved |
2017-07-06 16:01 | hgbot | Resolution | open => fixed |
2017-07-06 16:01 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/415e2a692c2da44c1c503cea8c5e259480b58336 [^] |
2017-07-06 16:02 | shuehner | Review Assigned To | => alostale |
2017-07-07 09:24 | alostale | Note Added: 0097928 | |
2017-07-07 09:24 | alostale | Status | resolved => closed |
2017-07-07 09:24 | alostale | Fixed in Version | => 3.0PR17Q4 |
2017-07-07 10:22 | hgbot | Checkin | |
2017-07-07 10:22 | hgbot | Note Added: 0097934 | |
2017-07-07 11:16 | alostale | Relationship added | related to 0036444 |
2017-09-21 16:49 | hudsonbot | Checkin | |
2017-09-21 16:49 | hudsonbot | Note Added: 0099244 | |
Notes |
|
|
Example change in the generated code:
@@ -117,8 +117,8 @@
} finally {
try {
connectionProvider.releasePreparedStatement(st);
- } catch(Exception ignore){
- ignore.printStackTrace();
+ } catch(Exception e){
+ log4j.error("Error during release*Statement of query: " + strSql, e);
}
}
return(updateCount); |
|
|
(0097919)
|
hgbot
|
2017-07-06 16:01
|
|
Repository: erp/devel/pi
Changeset: 415e2a692c2da44c1c503cea8c5e259480b58336
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Thu Jul 06 12:31:24 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/415e2a692c2da44c1c503cea8c5e259480b58336 [^]
Fixed 36429. Change code-generation to not use printStackTrace but log4j.error
printStackTrace should not be used but the standard log4j.error instead. This
changes the SqlC code-generator which had 1 common case left not following this.
Also it adds strSql as context to the logging message to make debugging easier.
---
M src-core/src/org/openbravo/data/Sqlc.java
---
|
|
|
|
|
|
(0097934)
|
hgbot
|
2017-07-07 10:22
|
|
Repository: erp/devel/pi
Changeset: a91838c63b773a0425c81b4c82dd1a395661aa07
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jul 07 10:21:47 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a91838c63b773a0425c81b4c82dd1a395661aa07 [^]
related to bug 36429: printStackTrace on sqlc queries
Fixed cases that do not directly use generated classes but a static
copy of them.
---
M src/org/openbravo/erpCommon/ad_process/AlertProcess.java
---
|
|
|
|
|