Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0035897 | Retail Modules | StoreServer | public | 2017-05-02 18:08 | 2017-05-26 08:07 | |||||||
Reporter | AugustoMauch | |||||||||||
Assigned To | mtaal | |||||||||||
Priority | normal | Severity | major | Reproducibility | have not tried | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | AugustoMauch | |||||||||||
OBNetwork customer | ||||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0035897: Prevent doing a commit inside an event handler (InvalidOrganizationChangeEventHandler) | |||||||||||
Description | Transactions must not be committed inside an event handler, or an error like this one [1] can occur. The InvalidOrganizationChangeEventHandler invokes the MobileServerProvider.getMobileServersForOrganization method, which can end up committing a transaction if some internal structure is not initialized. That method can also be called with a boolean parameter that determines if the transaction should be commited, that version should be used instead of the current one. [1] cdb72c84 219658 [http-bio-8080-exec-5] ERROR org.openbravo.retail.copystore.process.CopyStoreProcess - javax.enterprise.event.ObserverException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:344) at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:173) at org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:341) at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:33) at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:73) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:162) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233) 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) at org.openbravo.client.kernel.event.PersistenceEventOBInterceptor$Proxy$_$$_WeldClientProxy.onFlushDirty(PersistenceEventOBInterceptor$Proxy$_$$_WeldClientProxy.java) at org.openbravo.dal.core.OBInterceptor.onFlushDirty(OBInterceptor.java:194) 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.replication.symmetricds.util.MobileServerProvider.initializeDataCachedByOrganization(MobileServerProvider.java:231) at org.openbravo.replication.symmetricds.util.MobileServerProvider.getMobileServersForOrganization(MobileServerProvider.java:179) at org.openbravo.replication.symmetricds.util.MobileServerProvider.getMobileServersForOrganization(MobileServerProvider.java:169) at org.openbravo.retail.storeserver.synchronization.eventhandler.InvalidOrganizationChangeEventHandler.anyStoreServerHasNowAccessToRecord(InvalidOrganizationChangeEventHandler.java:144) | |||||||||||
Steps To Reproduce | I have not been able to reproduce this one, the log came from some BUT tests. | |||||||||||
Proposed Solution | ||||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2017-05-02 18:08 | AugustoMauch | New Issue | ||||||||||
2017-05-02 18:08 | AugustoMauch | Assigned To | => AugustoMauch | |||||||||
2017-05-02 18:08 | AugustoMauch | Triggers an Emergency Pack | => No | |||||||||
2017-05-02 18:08 | AugustoMauch | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=15091#r15091 | |||||||||
2017-05-02 18:37 | AugustoMauch | Review Assigned To | => mtaal | |||||||||
2017-05-03 09:59 | hgbot | Checkin | ||||||||||
2017-05-03 09:59 | hgbot | Note Added: 0096328 | ||||||||||
2017-05-03 09:59 | hgbot | Status | new => resolved | |||||||||
2017-05-03 09:59 | hgbot | Resolution | open => fixed | |||||||||
2017-05-03 09:59 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/9b51903469413969a79ddf223d9de412f30ad555 [^] | |||||||||
2017-05-07 21:38 | mtaal | Note Added: 0096436 | ||||||||||
2017-05-07 21:38 | mtaal | Status | resolved => new | |||||||||
2017-05-07 21:38 | mtaal | Resolution | fixed => open | |||||||||
2017-05-08 11:52 | mtaal | Assigned To | AugustoMauch => mtaal | |||||||||
2017-05-15 16:31 | mtaal | Status | new => scheduled | |||||||||
2017-05-19 11:13 | hgbot | Checkin | ||||||||||
2017-05-19 11:13 | hgbot | Note Added: 0096675 | ||||||||||
2017-05-19 11:13 | hgbot | Status | scheduled => resolved | |||||||||
2017-05-19 11:13 | hgbot | Resolution | open => fixed | |||||||||
2017-05-19 11:13 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/9b51903469413969a79ddf223d9de412f30ad555 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/adfb82ccf42286d731d4d7e68b766932f75b7d3e [^] | |||||||||
2017-05-19 11:15 | mtaal | Review Assigned To | mtaal => AugustoMauch | |||||||||
2017-05-19 11:15 | hgbot | Checkin | ||||||||||
2017-05-19 11:15 | hgbot | Note Added: 0096676 | ||||||||||
2017-05-22 15:36 | AugustoMauch | Note Added: 0096713 | ||||||||||
2017-05-22 15:36 | AugustoMauch | Status | resolved => closed | |||||||||
2017-05-26 08:06 | hgbot | Checkin | ||||||||||
2017-05-26 08:06 | hgbot | Note Added: 0096825 | ||||||||||
2017-05-26 08:07 | hgbot | Checkin | ||||||||||
2017-05-26 08:07 | hgbot | Note Added: 0096826 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|