Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0033718 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] StoreServer | minor | have not tried | 2016-08-16 02:42 | 2016-09-05 13:31 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 16bb47434364 | ||||
Projection | none | ETA | none | Target Version | RR16Q4 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | AugustoMauch | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0033718: NPE in Synchronized Process Caller if DataSynchronizationProcess does not define a valid DataSynchronization annotation | |||||||
Description | Normally a DataSynchronizationProcess class has a DataSynchronization annotation (like [1]). However there is also code where this is not the case because that code does not need it directly (like [2]). This can result in a NPE to be thrown like in [3]. [1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/ebf194422e27/src/org/openbravo/retail/posterminal/OrderLoader.java#l103 [^] [2] https://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/file/f620926094c0/src/org/openbravo/retail/sessions/SetBusinessDate.java#l28 [^] [3] java.lang.NullPointerException at org.openbravo.mobile.core.process.DataSynchronizationProcess.getEntity(DataSynchronizationProcess.java:387) at org.openbravo.mobile.core.servercontroller.SynchronizedServerProcessCaller.afterReturnFromCentral(SynchronizedServerProcessCaller.java:141) at org.openbravo.mobile.core.servercontroller.MultiServerJSONProcess.executeFromWebPOSInStore(MultiServerJSONProcess.java:361) at org.openbravo.mobile.core.servercontroller.MultiServerJSONProcess.exec(MultiServerJSONProcess.java:162) at org.openbravo.mobile.core.process.JSONProcessSimple.exec(JSONProcessSimple.java:59) at org.openbravo.mobile.core.process.SecuredJSONProcess.secureExec(SecuredJSONProcess.java:56) at org.openbravo.mobile.core.process.MobileServiceProcessor.execProcess(MobileServiceProcessor.java:117) at org.openbravo.mobile.core.process.MobileServiceProcessor.execServiceName(MobileServiceProcessor.java:79) | |||||||
Steps To Reproduce | Install multi-server with the retail.session module Open a store/till Set business date --> NPE | |||||||
Proposed Solution | Add code to robustly handle this case | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0089113) hgbot (developer) 2016-08-16 04:26 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 945ed441fffae5c0bab970cef1ec13e9f47d7a51 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Tue Aug 16 04:26:12 2016 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/945ed441fffae5c0bab970cef1ec13e9f47d7a51 [^] Fixes issue 33718: NPE in Synchronized Process Caller if DataSynchronizationProcess does not define a valid DataSynchronization annotation Prevent the NPE by checking if the annotation exists and return null if not --- M src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java M src/org/openbravo/mobile/core/servercontroller/SynchronizedServerProcessCaller.java --- |
(0089329) AugustoMauch (administrator) 2016-08-24 09:20 |
Use continue instead of return to process the rest of processors See line #20 at [1] [1] https://docs.google.com/spreadsheets/d/1DgowL4n6tbRFMch7duxbmWMTHePOlCoE8iCkbnPPeSg/edit#gid=0 [^] |
(0089563) hgbot (developer) 2016-08-30 22:16 |
Repository: erp/pmods/org.openbravo.mobile.core Changeset: 16bb47434364bfabecf52db0c1aeb98ff55c5666 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Tue Aug 30 22:16:04 2016 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/16bb47434364bfabecf52db0c1aeb98ff55c5666 [^] Fixes issue 33849: Infinite loop when exception in SynchronizedServerProcessCaller.afterReturnFromCentra Fixes issue 33718: NPE in Synchronized Process Caller if DataSynchronizationProcess does not define a valid DataSynchronization Used continue statement (33718), put retries++ after catch block and also try all processors --- M src/org/openbravo/mobile/core/servercontroller/SynchronizedServerProcessCaller.java --- |
(0089756) AugustoMauch (administrator) 2016-09-05 13:31 |
Code reviewed and verified in [1]@85572744adce [1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2016-08-16 02:42 | mtaal | New Issue | |
2016-08-16 02:42 | mtaal | Assigned To | => mtaal |
2016-08-16 02:42 | mtaal | OBNetwork customer | => No |
2016-08-16 02:42 | mtaal | Triggers an Emergency Pack | => No |
2016-08-16 04:26 | hgbot | Checkin | |
2016-08-16 04:26 | hgbot | Note Added: 0089113 | |
2016-08-16 04:26 | hgbot | Status | new => resolved |
2016-08-16 04:26 | hgbot | Resolution | open => fixed |
2016-08-16 04:26 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/945ed441fffae5c0bab970cef1ec13e9f47d7a51 [^] |
2016-08-16 10:47 | mtaal | Review Assigned To | => AugustoMauch |
2016-08-24 09:20 | AugustoMauch | Note Added: 0089329 | |
2016-08-24 09:20 | AugustoMauch | Status | resolved => new |
2016-08-24 09:20 | AugustoMauch | Resolution | fixed => open |
2016-08-30 22:16 | hgbot | Checkin | |
2016-08-30 22:16 | hgbot | Note Added: 0089563 | |
2016-08-30 22:16 | hgbot | Status | new => resolved |
2016-08-30 22:16 | hgbot | Resolution | open => fixed |
2016-08-30 22:16 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/945ed441fffae5c0bab970cef1ec13e9f47d7a51 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/16bb47434364bfabecf52db0c1aeb98ff55c5666 [^] |
2016-09-05 13:31 | AugustoMauch | Note Added: 0089756 | |
2016-09-05 13:31 | AugustoMauch | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |