Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037226Retail ModulesStoreServerpublic2017-11-06 10:062017-11-08 12:34
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
 
piRR18Q1 
AugustoMauch
No
0037226: Exception in status update thread
Organization check exception is thrown when store server is offline and wants to go online.

[1]
Exception in thread "StatusUpdateThread" org.openbravo.base.exception.OBSecurityException: Organization 0 of object (OBMOBC_SERVER_DEFINITION(41AC2AC8B03249F48FE73782FA190318) (name: Central)) is not present in OrganizationList [102D0E6D37DA46C3BABA6DFF3708F341, D270A5AC50874F8BA67A88EE977F8E3B, 14B1927026BE471E9B85FE699BCA61C2, 4399136852B145BD96CC2A6CE0800C68, B5DE96143D6642228E3B9DEC69886A47, 3B187EC130A549A7A9388F8060EF156D, 687AD71263F94A31B85A3CC9942FF7ED, DF86640764AA4492AB6D4CA2D432B8D4, 67839EEFA49E44AC969BD60093FCC899, 01AD882EFC8545ACA6455E2F6FD51EE9, BF129721D9FB4EB0819509934153E972]
    at org.openbravo.dal.security.SecurityChecker.checkWriteAccess(SecurityChecker.java:166)
    at org.openbravo.dal.security.SecurityChecker.checkWriteAccess(SecurityChecker.java:105)
    at org.openbravo.dal.core.OBInterceptor.doEvent(OBInterceptor.java:350)
    at org.openbravo.dal.core.OBInterceptor.onFlushDirty(OBInterceptor.java:186)
    at org.hibernate.event.def.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:372)
    at org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:349)
    at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:287)
    at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:155)
    at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
    at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
    at org.openbravo.dal.service.OBDal.flush(OBDal.java:260)
    at org.openbravo.dal.core.SessionHandler.flushRemainingChanges(SessionHandler.java:680)
    at org.openbravo.dal.core.SessionHandler.commitAndClose(SessionHandler.java:592)
    at org.openbravo.dal.service.OBDal.commitAndClose(OBDal.java:223)
    at org.openbravo.mobile.core.servercontroller.MobileServerStatusUpdateHandler$StatusUpdateRunnable.run(MobileServerStatusUpdateHandler.java:98)
    at java.lang.Thread.run(Thread.java:745)
I found this when starting the servers both in offline mode. When starting the servers, login to webpos and then order a product it gives the above exception.

I am not sure how reproducable it is in other cases. In any case the change seems to make sense and low risk.
Change:
OBContext.setAdminMode(true);
to
OBContext.setAdminMode(false);
No tags attached.
Issue History
2017-11-06 10:06mtaalNew Issue
2017-11-06 10:06mtaalAssigned To => mtaal
2017-11-06 10:06mtaalTriggers an Emergency Pack => No
2017-11-07 15:13mtaalStatusnew => acknowledged
2017-11-07 15:13mtaalReview Assigned To => AugustoMauch
2017-11-07 15:13mtaalDescription Updatedbug_revision_view_page.php?rev_id=16247#r16247
2017-11-08 08:53hgbotCheckin
2017-11-08 08:53hgbotNote Added: 0100324
2017-11-08 08:53hgbotStatusacknowledged => resolved
2017-11-08 08:53hgbotResolutionopen => fixed
2017-11-08 08:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/292f980c1e0e11806afad1b048f87143f51db470 [^]
2017-11-08 12:34AugustoMauchNote Added: 0100348
2017-11-08 12:34AugustoMauchStatusresolved => closed
2017-11-08 12:34AugustoMauchFixed in Version => RR18Q1

Notes
(0100324)
hgbot   
2017-11-08 08:53   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 292f980c1e0e11806afad1b048f87143f51db470
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Nov 08 08:53:18 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/292f980c1e0e11806afad1b048f87143f51db470 [^]

Fixes issue 37226: Exception in status update thread
Do not check org level in admin mode as otherwise fails for records of org 0

---
M src/org/openbravo/mobile/core/servercontroller/MobileServerStatusUpdateHandler.java
---
(0100348)
AugustoMauch   
2017-11-08 12:34   
Code reviewed and verified