Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0038591 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
design defect | [Modules] External Data Integration | major | have not tried | 2018-05-22 11:44 | 2018-11-16 07:50 | |||||||
Reporter | javietxe | View Status | public | |||||||||
Assigned To | AugustoMauch | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | e32866258863 | ||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Regression date | ||||||||||||
Regression introduced by commit | ||||||||||||
Regression level | ||||||||||||
Review Assigned To | ||||||||||||
Regression introduced in release | ||||||||||||
Summary | 0038591: SERQA 197 Int: No error detail If NullPointerException happens in itemProcessor.processItem | |||||||||||
Description | If a NullPointerException happens in itemProcessor.processItem, the EDL is saved in error but there is not any detail of the error in the requestLine. This is because the error is saved doing e.getMessage() and in case of NullPointerException there is not message. | |||||||||||
Steps To Reproduce | Implement an itemProcessor throwing a NullPointerException. No message will be stored in the RequestLine in error. | |||||||||||
Proposed Solution | Store the whole exception. Being e the exception: Instead of saveFailedItem(item, e.getMessage()); Fix: StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); String error = sw.toString(); saveFailedItem(item, error); | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0105569) AugustoMauch (administrator) 2018-07-04 10:29 |
Changed to design defect, because the fix is not clear. There are many cases where the exception captured is a checked exception, and showing the full stack trace would not help. |
(0107851) javietxe (developer) 2018-11-12 13:47 edited on: 2018-11-12 13:48 |
If the getMessage is not null, it is because the captured exception is not a checked exception. In these cases, it would help a lot having the stacktrace in order to debug the error. Proposed solution: if (e.getMessage() == null) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); String error = sw.toString(); saveFailedItem(item, error); } else { saveFailedItem(getBatchFromList(errorItem), e.getMessage()); } |
Issue History | |||
Date Modified | Username | Field | Change |
2018-05-22 11:44 | javietxe | New Issue | |
2018-05-22 11:44 | javietxe | Assigned To | => platform |
2018-05-22 11:44 | javietxe | Resolution time | => 1528149600 |
2018-06-18 18:23 | hgbot | Checkin | |
2018-06-18 18:23 | hgbot | Note Added: 0105198 | |
2018-06-18 18:23 | hgbot | Status | new => resolved |
2018-06-18 18:23 | hgbot | Resolution | open => fixed |
2018-06-18 18:23 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.externaldata.integration/rev/e32866258863777e7844e870be26019e14d6148d [^] |
2018-06-18 18:40 | AugustoMauch | Status | resolved => new |
2018-06-18 18:40 | AugustoMauch | Resolution | fixed => open |
2018-06-18 18:40 | AugustoMauch | Note Deleted: 0105198 | |
2018-06-19 11:57 | AugustoMauch | Assigned To | platform => AugustoMauch |
2018-07-04 10:28 | AugustoMauch | Resolution time | 1528149600 => |
2018-07-04 10:28 | AugustoMauch | Type | defect => design defect |
2018-07-04 10:29 | AugustoMauch | Note Added: 0105569 | |
2018-11-12 13:47 | javietxe | Note Added: 0107851 | |
2018-11-12 13:48 | javietxe | Note Edited: 0107851 | View Revisions |
Copyright © 2000 - 2009 MantisBT Group |