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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045169
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Sessionsminorhave not tried2020-10-01 15:452020-10-07 14:02
ReportershuehnerView Statuspublic 
Assigned ToRetail 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045169: Some exceptions raised in ImportEntry processing end up being logged in catalina.out (and not using log4j2)

DescriptionAny log info ending up in catalina.out is every bad
- no date/time
- no location
- no info which webapp/context (i.e. livebuilds with many contexts at once)
- File no rotated

The following stacktrace (seen in livebuilds) ended up in catalina.out so apparently we miss some error handling catch all (if custom code for the entry type is not handling 'all possible exceptions' itself.

java.text.ParseException: Unparseable date: "0NaN-NaN-NaN NaN:NaN:NaN.NaN"
        at java.base/java.text.DateFormat.parse(DateFormat.java:395)
        at org.openbravo.retail.sessions.SetBusinessDate.saveRecord(SetBusinessDate.java:41)
        at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:201)
        at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:156)
        at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:88)
        at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:54)
        at org.openbravo.retail.sessions.SetBusinessDateEntryProcessor$SetBusinessDateRunnable.processEntry(SetBusinessDateEntryProcessor.java:73)
        at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:372)
        at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:293)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Steps To Reproduceunknown
Proposed SolutionAdd global catch block in import entry processing to catch any non handled exceptions raised and log them properly using log4j.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks design defect 0036162 acknowledgedplatform Openbravo ERP clean up openbravo.log 

-  Notes
(0123605)
alostale (developer)
2020-10-07 13:59

The problem for the reported case is in sessions module [1]:
    } catch (ParseException e) {
      e.printStackTrace();
    }


On top of simply logging with log4j:
* Add some relevant context to know the reason it failed
* Even more important: is it ok to just catch and ignore the exception responding success?

---
[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.sessions/-/blob/dcd7d06b11da3820b31441a66d7a1b1a3225b41c/src/org/openbravo/retail/sessions/SetBusinessDate.java#L74 [^]

- Issue History
Date Modified Username Field Change
2020-10-01 15:45 shuehner New Issue
2020-10-01 15:45 shuehner Assigned To => platform
2020-10-01 15:45 shuehner Modules => Core
2020-10-01 15:45 shuehner Triggers an Emergency Pack => No
2020-10-07 13:59 alostale Note Added: 0123605
2020-10-07 14:01 alostale Project Openbravo ERP => Retail Modules
2020-10-07 14:01 alostale Assigned To platform => Retail
2020-10-07 14:01 alostale Category A. Platform => Sessions
2020-10-07 14:02 alostale Relationship added blocks 0036162


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker