Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035999 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Retail Modules] StoreServer | major | have not tried | 2017-05-02 18:08 | 2017-06-05 16:40 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | no change required | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 9b5190346941 | ||||
Projection | none | ETA | none | Target Version | RR17Q2.1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | mtaal | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0035999: 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. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2017-05-15 16:31 | mtaal | Type | defect => backport |
2017-05-15 16:31 | mtaal | Target Version | => RR17Q2.1 |
2017-06-05 16:40 | mtaal | Note Added: 0097136 | |
2017-06-05 16:40 | mtaal | Status | scheduled => closed |
2017-06-05 16:40 | mtaal | Resolution | open => no change required |
Copyright © 2000 - 2009 MantisBT Group |