Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033849Retail ModulesStoreServerpublic2016-08-30 09:282016-09-05 13:23
mtaal 
mtaal 
normalcriticalhave not tried
closedfixed 
5
 
RR16Q4 
AugustoMauch
No
0033849: Infinite loop when exception in SynchronizedServerProcessCaller.afterReturnFromCentral - also check other datas for synced data
If an exception occurs here [1] then the retries++ here [2] is never reached and the loop [3] will never end. See an example of an exception [5].

Another improvement is to not return to early [4], continue to check also other data if present.

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/5d4b82d17abe/src/org/openbravo/mobile/core/servercontroller/SynchronizedServerProcessCaller.java#l136 [^]

[2]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/5d4b82d17abe/src/org/openbravo/mobile/core/servercontroller/SynchronizedServerProcessCaller.java#l175 [^]

[3]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/5d4b82d17abe/src/org/openbravo/mobile/core/servercontroller/SynchronizedServerProcessCaller.java#l130 [^]

[4]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/5d4b82d17abe/src/org/openbravo/mobile/core/servercontroller/SynchronizedServerProcessCaller.java#l164 [^]

[5]
2016-08-30 06:22:59,101 [TP-Processor6] ERROR org.openbravo.mobile.core.servercontroller.SynchronizedServerProcessCaller - No bean found for type class org.openbravo.retail.sessions.OpenSessionPOS
java.lang.IllegalArgumentException: No bean found for type class org.openbravo.retail.sessions.OpenSessionPOS
        at org.openbravo.base.weld.WeldUtils.getInstanceFromStaticBeanManager(WeldUtils.java:97)
        at org.openbravo.mobile.core.process.MobileServiceProcessor.getServiceClassInstances(MobileServiceProcessor.java:162)
        at org.openbravo.mobile.core.servercontroller.SynchronizedServerProcessCaller.afterReturnFromCentral(SynchronizedServerProcessCaller.java:134)
        at org.openbravo.mobile.core.servercontroller.MultiServerJSONProcess.executeFromWebPOSInStore(MultiServerJSONProcess.java:359)
        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)
        at org.openbravo.mobile.core.process.MobileService.doGetOrPost(MobileService.java:89)
        at org.openbravo.mobile.core.process.MobileService.doPost(MobileService.java:59)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:228)
        at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:431)
        at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:87)
        at org.openbravo.mobile.core.process.WebServiceAuthenticatedServlet.service(WebServiceAuthenticatedServlet.java:60)
Force an exception in the above code line
Move the retries++ to just within the outside loop (it was in a wrong place anyway).
No tags attached.
diff but-33849.diff (1,440) 2016-08-31 09:22
https://issues.openbravo.com/file_download.php?file_id=9768&type=bug
Issue History
2016-08-30 09:28mtaalNew Issue
2016-08-30 09:28mtaalAssigned To => mtaal
2016-08-30 09:28mtaalTriggers an Emergency Pack => No
2016-08-30 09:30mtaalSummaryInfinite loop in case of exception in SynchronizedServerProcessCaller.afterReturnFromCentral => Infinite loop when exception in SynchronizedServerProcessCaller.afterReturnFromCentral - also check other datas for synced data
2016-08-30 09:30mtaalDescription Updatedbug_revision_view_page.php?rev_id=12965#r12965
2016-08-30 22:16hgbotCheckin
2016-08-30 22:16hgbotNote Added: 0089562
2016-08-30 22:16hgbotStatusnew => resolved
2016-08-30 22:16hgbotResolutionopen => fixed
2016-08-30 22:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/16bb47434364bfabecf52db0c1aeb98ff55c5666 [^]
2016-08-30 22:17mtaalReview Assigned To => AugustoMauch
2016-08-31 09:22mtaalFile Added: but-33849.diff
2016-09-05 13:23AugustoMauchNote Added: 0089755
2016-09-05 13:23AugustoMauchStatusresolved => closed

Notes
(0089562)
hgbot   
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
---
(0089755)
AugustoMauch   
2016-09-05 13:23   
Code reviewed and verified in [1]@85572744adce

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