Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0034464 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] StoreServer | minor | have not tried | 2016-11-10 15:26 | 2016-11-12 18:54 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 160ea613e4cc | ||||
Projection | none | ETA | none | Target Version | RR17Q1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | AugustoMauch | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0034464: InvalidOrganizationChangeEventHandler should use adminmode when reading development/admin information | |||||||
Description | See the related stacktrace [3] and [4], is caused because the call to dal here [1] [2] is not done in admin mode. [1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/24ecfabd909e/src/org/openbravo/retail/storeserver/synchronization/eventhandler/InvalidOrganizationChangeEventHandler.java#l68 [^] [2] https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/24ecfabd909e/src/org/openbravo/retail/storeserver/synchronization/eventhandler/InvalidOrganizationChangeEventHandler.java#l82 [^] [2] org.openbravo.base.exception.OBSecurityException: Entity strsync_custom_router is not readable by the user 100 at org.openbravo.dal.security.EntityAccessChecker.checkReadable(EntityAccessChecker.java:447) at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:601) at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:588) at org.openbravo.dal.service.OBDal.get(OBDal.java:297) at org.openbravo.retail.storeserver.synchronization.eventhandler.InvalidOrganizationChangeEventHandler.<clinit>(InvalidOrganizationChangeEventHandler.java:68) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.jboss.weld.introspector.jlr.WeldConstructorImpl.newInstance(WeldConstructorImpl.java:206) at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:117) at org.jboss.weld.bean.ManagedBean.createInstance(ManagedBean.java:340) at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.produce(ManagedBean.java:204) at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:296) at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:68) at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:626) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:232) at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213) at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:117) at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:85) at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:80) at org.jboss.weld.event.EventImpl.fire(EventImpl.java:69) at org.openbravo.client.kernel.event.PersistenceEventOBInterceptor.sendUpdateEvent(PersistenceEventOBInterceptor.java:106) at org.openbravo.client.kernel.event.PersistenceEventOBInterceptor.onFlushDirty(PersistenceEventOBInterceptor.java:75) [4] org.openbravo.base.exception.OBSecurityException: Entity STRSYNC_SynchronizedTable is not readable by the user 100 at org.openbravo.dal.security.EntityAccessChecker.checkReadable(EntityAccessChecker.java:447) at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:601) at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:588) at org.openbravo.dal.service.OBDal.createCriteria(OBDal.java:435) at org.openbravo.retail.storeserver.synchronization.eventhandler.InvalidOrganizationChangeEventHandler.getSynchronizedEntitiesRouterByOrganization(InvalidOrganizationChangeEventHandler.java:92) at org.openbravo.retail.storeserver.synchronization.eventhandler.InvalidOrganizationChangeEventHandler.getObservedEntities(InvalidOrganizationChangeEventHandler.java:86) at org.openbravo.client.kernel.event.EntityPersistenceEventObserver.isValidEvent(EntityPersistenceEventObserver.java:54) at org.openbravo.retail.storeserver.synchronization.eventhandler.InvalidOrganizationChangeEventHandler.onUpdate(InvalidOrganizationChangeEventHandler.java:110) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) | |||||||
Steps To Reproduce | Run one of these testcases: org.openbravo.test.webservice.WSUpdateTest.testBReadUpdateCity org.openbravo.test.datasource.DataSourceSecurity.fetchShouldBeAllowedOnlyIfRoleIsGranted | |||||||
Proposed Solution | Call dal in admin mode. You can check the results of this build. It should get green after this change: https://ci.openbravo.com/view/modules/job/mod-storeserver/ [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0091337) hgbot (developer) 2016-11-10 15:28 |
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization Changeset: 160ea613e4ccb54475678eebf854c0409261f7ca Author: Martin Taal <martin.taal <at> openbravo.com> Date: Thu Nov 10 15:27:43 2016 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/160ea613e4ccb54475678eebf854c0409261f7ca [^] Fixes issue 34464: Error when initializing EventHandler using DAL when initializing static member Encapsulate call to dal in admin mode --- M src/org/openbravo/retail/storeserver/synchronization/eventhandler/InvalidOrganizationChangeEventHandler.java --- |
(0091409) hgbot (developer) 2016-11-12 00:16 |
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization Changeset: c31aedba29ba0b53ac29439f0334676e5e3f07e7 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Sat Nov 12 00:15:55 2016 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/c31aedba29ba0b53ac29439f0334676e5e3f07e7 [^] Related to issue 34464: Error when initializing EventHandler using DAL when initializing static member Also set admin mode in other read of admin information --- M src/org/openbravo/retail/storeserver/synchronization/eventhandler/InvalidOrganizationChangeEventHandler.java --- |
(0091413) AugustoMauch (administrator) 2016-11-12 18:54 |
Code reviewed and verified in [1]@a1311dd247c9 [1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2016-11-10 15:26 | mtaal | New Issue | |
2016-11-10 15:26 | mtaal | Assigned To | => mtaal |
2016-11-10 15:26 | mtaal | OBNetwork customer | => No |
2016-11-10 15:26 | mtaal | Triggers an Emergency Pack | => No |
2016-11-10 15:27 | mtaal | Review Assigned To | => AugustoMauch |
2016-11-10 15:28 | hgbot | Checkin | |
2016-11-10 15:28 | hgbot | Note Added: 0091337 | |
2016-11-10 15:28 | hgbot | Status | new => resolved |
2016-11-10 15:28 | hgbot | Resolution | open => fixed |
2016-11-10 15:28 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/160ea613e4ccb54475678eebf854c0409261f7ca [^] |
2016-11-10 15:29 | mtaal | Proposed Solution updated | |
2016-11-11 17:43 | shuehner | Issue Monitored: shuehner | |
2016-11-12 00:16 | hgbot | Checkin | |
2016-11-12 00:16 | hgbot | Note Added: 0091409 | |
2016-11-12 00:18 | mtaal | Summary | Error when initializing EventHandler using DAL when initializing static member => InvalidOrganizationChangeEventHandler should use adminmode when reading development/admin information |
2016-11-12 00:18 | mtaal | Description Updated | View Revisions |
2016-11-12 18:54 | AugustoMauch | Note Added: 0091413 | |
2016-11-12 18:54 | AugustoMauch | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |