Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035645
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] StoreServermajorhave not tried2017-03-29 19:162017-03-30 16:32
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in VersionRR17Q2
StatusclosedFix in branchFixed in SCM revision3f81060a571b
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035645: Prevent invoking a commitAndClose inside an event handler

DescriptionThe 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 ReproduceIn 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0034465 closedAugustoMauch Initialize.bp.segmentation.tables does not take into account BPartners of gift card instances 

-  Notes
(0095676)
hgbot (developer)
2017-03-29 19:20

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: 36a93cba93a55b2c611fa6a5af622e5112a89f44
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Mar 29 19:18:56 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/36a93cba93a55b2c611fa6a5af622e5112a89f44 [^]

Fixes issue 35645: Allow to initialize cache without transaction commit

The two caches of MobileServerProvider now can be initialized with or without a transaction commit. By default they will be initialized committing the transaction, to preserve the current behaviour.

---
M src/org/openbravo/replication/symmetricds/util/MobileServerProvider.java
---
(0095677)
hgbot (developer)
2017-03-29 19:23

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 3f81060a571b5957586ce77702b27075277b325e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Mar 29 19:21:13 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/3f81060a571b5957586ce77702b27075277b325e [^]

Fixes issue 35645: Prevents invoking a commitAndClose inside an eventhandler

---
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/OrderEventHandler.java
---
(0095724)
mtaal (manager)
2017-03-30 16:32

Reviewed

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker