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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033718
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] StoreServerminorhave not tried2016-08-16 02:422016-09-05 13:31
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision16bb47434364
ProjectionnoneETAnoneTarget VersionRR16Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033718: NPE in Synchronized Process Caller if DataSynchronizationProcess does not define a valid DataSynchronization annotation

DescriptionNormally 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 ReproduceInstall multi-server with the retail.session module
Open a store/till
Set business date --> NPE
Proposed SolutionAdd code to robustly handle this case
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(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 (manager)
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 (manager)
2016-09-05 13:31

Code reviewed and verified in [1]@85572744adce

[1] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core [^]

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