Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035878Retail ModulesStoreServerpublic2017-04-28 12:142017-05-01 17:28
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
RR17Q3 
mtaal
No
0035878: Missing setAdminMode in MultiServerJSONSymmetricDSStarter
A missing setAdminMode in the MultiServerJSONSymmetricDSStarter class results in this exception being logged:

ERROR org.openbravo.mobile.core.process.JSONRowConverter - Error in JSON process: Entity OBMOBC_SERVER_DEFINITION is not directly readable, only id and identifier properties are readable, property OBMOBC_SERVER_DEFINITION.mobileServerKey is neither of these.
org.openbravo.base.exception.OBSecurityException: Entity OBMOBC_SERVER_DEFINITION is not directly readable, only id and identifier properties are readable, property OBMOBC_SERVER_DEFINITION.mobileServerKey is neither of these.
        at org.openbravo.base.structure.BaseOBObject.checkDerivedReadable(BaseOBObject.java:295)
        at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:255)
        at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:232)
        at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:213)
        at org.openbravo.mobile.core.MobileServerDefinition.getMobileServerKey(MobileServerDefinition.java:233)
        at org.openbravo.retail.storeserver.synchronization.MultiServerJSONSymmetricDSStarter.doAction(MultiServerJSONSymmetricDSStarter.java:61)

I have not been able to reproduce it locally, but it was reproduced in a test in BUT. As it makes total sense to wrap the method in an adminMode block, it is better just to add it to be safe.
In BUT's test environment:

- Create an order. This error will be logged:

ERROR org.openbravo.mobile.core.process.JSONRowConverter - Error in JSON process: Entity OBMOBC_SERVER_DEFINITION is not directly readable, only id and identifier properties are readable, property OBMOBC_SERVER_DEFINITION.mobileServerKey is neither of these.
org.openbravo.base.exception.OBSecurityException: Entity OBMOBC_SERVER_DEFINITION is not directly readable, only id and identifier properties are readable, property OBMOBC_SERVER_DEFINITION.mobileServerKey is neither of these.
        at org.openbravo.base.structure.BaseOBObject.checkDerivedReadable(BaseOBObject.java:295)
        at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:255)
        at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:232)
        at org.openbravo.base.structure.BaseOBObject.get(BaseOBObject.java:213)
        at org.openbravo.mobile.core.MobileServerDefinition.getMobileServerKey(MobileServerDefinition.java:233)
        at org.openbravo.retail.storeserver.synchronization.MultiServerJSONSymmetricDSStarter.doAction(MultiServerJSONSymmetricDSStarter.java:61)
No tags attached.
depends on backport 0035887RR17Q2.2 closed AugustoMauch Missing setAdminMode in MultiServerJSONSymmetricDSStarter 
Issue History
2017-04-28 12:14AugustoMauchNew Issue
2017-04-28 12:14AugustoMauchAssigned To => AugustoMauch
2017-04-28 12:14AugustoMauchTriggers an Emergency Pack => No
2017-04-28 13:07AugustoMauchReview Assigned To => mtaal
2017-04-28 13:08hgbotCheckin
2017-04-28 13:08hgbotNote Added: 0096262
2017-04-28 13:08hgbotStatusnew => resolved
2017-04-28 13:08hgbotResolutionopen => fixed
2017-04-28 13:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/b3ce4434817e090ee39b11ed420ce80d31436b6d [^]
2017-05-01 17:28mtaalNote Added: 0096287
2017-05-01 17:28mtaalStatusresolved => new
2017-05-01 17:28mtaalResolutionfixed => open
2017-05-01 17:28mtaalStatusnew => scheduled
2017-05-01 17:28mtaalNote Added: 0096288
2017-05-01 17:28mtaalStatusscheduled => resolved
2017-05-01 17:28mtaalFixed in Version => RR17Q3
2017-05-01 17:28mtaalResolutionopen => fixed
2017-05-01 17:28mtaalNote Added: 0096289
2017-05-01 17:28mtaalStatusresolved => closed

Notes
(0096262)
hgbot   
2017-04-28 13:08   
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: b3ce4434817e090ee39b11ed420ce80d31436b6d
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Apr 28 13:04:28 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/b3ce4434817e090ee39b11ed420ce80d31436b6d [^]

Fixes issue 35878: Missing admin mode block MultiServerJSONSymmetricDSStarter

Without the adminMode block, there can be an error when trying to acess the MobileServerDefinition entity.

---
M src/org/openbravo/retail/storeserver/synchronization/MultiServerJSONSymmetricDSStarter.java
---
(0096287)
mtaal   
2017-05-01 17:28   
change status to new to backport
(0096288)
mtaal   
2017-05-01 17:28   
back to resolved
(0096289)
mtaal   
2017-05-01 17:28   
reviewed