Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0035645 | Retail Modules | StoreServer | public | 2017-03-29 19:16 | 2017-03-30 16:32 | |||||||
Reporter | AugustoMauch | |||||||||||
Assigned To | AugustoMauch | |||||||||||
Priority | normal | Severity | major | Reproducibility | have not tried | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | RR17Q2 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | mtaal | |||||||||||
OBNetwork customer | ||||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0035645: Prevent invoking a commitAndClose inside an event handler | |||||||||||
Description | The OrderEventHandler class [1] invokes the MobileServerProvider.getInstance().getMobileServersForOrganization(organizationId) method to fetch the list of servers with access to that organization. The problem is that the getMobileServersForOrganization ends up invoking commitAndClose [2] if its cache has not been initialized. Error log: 69315 [http-bio-8070-exec-9] WARN org.openbravo.dal.core.OBInterceptor - The object GCNV_GiftCardInst(18EFFD272CF8464790497CD1456CA6B7) (searchKey: Test, type: BasedOnProductGiftCard) is detected as not new (is its id != null?) but it does not have a current state in the database. This can happen when the id is set but not setNewObject(true); has been called. 69321 [http-bio-8070-exec-9] ERROR org.hibernate.jdbc.AbstractBatcher - Exception executing batch: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:85) at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:70) at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:90) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) 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) [1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/file/f982c1ca4b6c/src/org/openbravo/retail/storeserver/synchronization/eventhandler/OrderEventHandler.java#l152 [^] [2] | |||||||||||
Steps To Reproduce | In a central server without SymmetricDS installed, create a giftcard instance. If the MobileServerProvider cache is not initialized, the error will be shown and the giftcard instance will not be created. | |||||||||||
Proposed Solution | ||||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2017-03-29 19:16 | AugustoMauch | New Issue | ||||||||||
2017-03-29 19:16 | AugustoMauch | Assigned To | => AugustoMauch | |||||||||
2017-03-29 19:16 | AugustoMauch | Triggers an Emergency Pack | => No | |||||||||
2017-03-29 19:20 | hgbot | Checkin | ||||||||||
2017-03-29 19:20 | hgbot | Note Added: 0095676 | ||||||||||
2017-03-29 19:20 | hgbot | Status | new => resolved | |||||||||
2017-03-29 19:20 | hgbot | Resolution | open => fixed | |||||||||
2017-03-29 19:20 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/36a93cba93a55b2c611fa6a5af622e5112a89f44 [^] | |||||||||
2017-03-29 19:23 | hgbot | Checkin | ||||||||||
2017-03-29 19:23 | hgbot | Note Added: 0095677 | ||||||||||
2017-03-29 19:23 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/36a93cba93a55b2c611fa6a5af622e5112a89f44 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/3f81060a571b5957586ce77702b27075277b325e [^] | |||||||||
2017-03-29 19:23 | AugustoMauch | Review Assigned To | => mtaal | |||||||||
2017-03-29 19:25 | AugustoMauch | Relationship added | related to 0034465 | |||||||||
2017-03-30 16:32 | mtaal | Note Added: 0095724 | ||||||||||
2017-03-30 16:32 | mtaal | Status | resolved => closed | |||||||||
2017-03-30 16:32 | mtaal | Fixed in Version | => RR17Q2 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|