Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038414Retail ModulesStore Summary Reportpublic2018-04-19 15:422018-04-25 09:56
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
 
mtaal
No
0038414: Error when routing entries of OBPOS_Userterminal_Access
The following error happens when routing a deletion from the OBPOS_Userterminal_Access table:

org.jumpmind.symmetric.SymmetricException: Failed to route data: 10457573 for table: obpos_userterminal_access.
Failed pk data was: "74C76B9AAF0447BDAA9C7A1933CF79F2"
Failed old data was: "74C76B9AAF0447BDAA9C7A1933CF79F2","9404134F8B374DEE92E79CD87B834E19","DEE69131374348AC8876E251549D36CA","Y","2018-04-10 13:45:25.315000","42E871E1F9F4424A80B420068DB5E452","2018-04-10 13:45:25.315000","42E871E1F9F4424A80B420068DB5E452","3FAAAE18E35941BAAB8FA0C9349ACD27","04CDDA3C65FB42F4812CAA58A16F0715"

        at org.jumpmind.symmetric.service.impl.RouterService.routeData(RouterService.java:955)
        at org.jumpmind.symmetric.service.impl.RouterService.selectDataAndRoute(RouterService.java:839)
        at org.jumpmind.symmetric.service.impl.RouterService.routeDataForChannel(RouterService.java:636)
        at org.jumpmind.symmetric.service.impl.RouterService.routeDataForEachChannel(RouterService.java:429)
        at org.jumpmind.symmetric.service.impl.RouterService.routeData(RouterService.java:202)
        at org.jumpmind.symmetric.job.RouterJob.doJob(RouterJob.java:50)
        at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:175)
        at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:219)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.openbravo.retail.storeserver.synchronization.router.UserTerminalAccessRouter.doRouteToOrganizationFilteredNodes(UserTerminalAccessRouter.java:64)
In the central server:
- Create an entry in the POS Terminal window
- Assign that terminal to a user in the POS Terminal Access Tab of the User window
- Delete the POS Terminal created in the first step. The exception will be thrown then SymmetricDS tries to route the deletion
No tags attached.
Issue History
2018-04-19 15:42AugustoMauchNew Issue
2018-04-19 15:42AugustoMauchAssigned To => AugustoMauch
2018-04-19 15:42AugustoMauchTriggers an Emergency Pack => No
2018-04-20 09:43AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17039#r17039
2018-04-20 10:00AugustoMauchReview Assigned To => mtaal
2018-04-20 10:00hgbotCheckin
2018-04-20 10:00hgbotNote Added: 0104009
2018-04-20 10:00hgbotStatusnew => resolved
2018-04-20 10:00hgbotResolutionopen => fixed
2018-04-20 10:00hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/ed59c5ac2a1728e79a29533e26aaf26b9ccc09b1 [^]
2018-04-25 09:56mtaalNote Added: 0104067
2018-04-25 09:56mtaalStatusresolved => closed

Notes
(0104009)
hgbot   
2018-04-20 10:00   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: ed59c5ac2a1728e79a29533e26aaf26b9ccc09b1
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Apr 20 10:00:01 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/ed59c5ac2a1728e79a29533e26aaf26b9ccc09b1 [^]

Fixes issue 38414: Some routers queried records that could be deleted

There were two routers that made queries and that were not taking into accout that the records they were looking
for could be deleted.

Now they detect if the record is deleted, and if so they route the change to all store servers. Routing deletions
is safe because if the deleted record is not part of the store, the change will just be ignored.

---
M src/org/openbravo/retail/storeserver/synchronization/router/ProductPriceRouter.java
M src/org/openbravo/retail/storeserver/synchronization/router/UserTerminalAccessRouter.java
---
(0104067)
mtaal   
2018-04-25 09:56   
reviewed and tested