Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038759Retail ModulesSessionspublic2018-06-14 13:332019-06-18 15:41
malsasua 
rqueralta 
highmajorrandom
closedfixed 
5
 
RR18Q3 
marvintm
No
0038759: No Terminal is set in the session record in Data Import Entry window: It can generate DeadLock database error
When the till is opened, the record created in Data Import Entry with type of data Open till, is generated without terminal, and it can generate database locks
[offline]
. open till in POS with differences
go online

in Errors While Importing:

ERROR: deadlock detected
  Detail: Process 5961 waits for ShareLock on transaction 298218968; blocked by process 347.
Process 347 waits for ShareLock on transaction 298218967; blocked by process 5961.
  Hint: See server log for query details.
  Where: while locking tuple (11039,29) in relation "obpos_app_cashup"
SQL statement "SELECT 1 FROM ONLY "public"."obpos_app_cashup" x WHERE "obpos_app_cashup_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:338)
    at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:2534)
    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:184)
    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.retail.posterminal.UpdateCashup.getAndUpdateCashUp(UpdateCashup.java:165)
    at org.openbravo.retail.posterminal.ProcessCashMgmt.saveRecord(ProcessCashMgmt.java:58)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:196)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:153)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:85)
    at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:53)
    at org.openbravo.retail.posterminal.importprocess.CashManagementImportEntryProcessor$CashManagementRunnable.processEntry(CashManagementImportEntryProcessor.java:68)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:363)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:285)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
No tags attached.
related to defect 0041118 scheduled Retail Column "em_obpos_applications_id" of "c_import_entry" not filled by "OBMOBC_TerminalLog" or "OBCFR_TerminalMonitor" 
Issue History
2018-06-14 13:33malsasuaNew Issue
2018-06-14 13:33malsasuaAssigned To => Retail
2018-06-14 13:33malsasuaResolution time => 1530914400
2018-06-14 13:33malsasuaTriggers an Emergency Pack => No
2018-06-15 20:40rqueraltaAssigned ToRetail => rqueralta
2018-06-15 20:40rqueraltaStatusnew => scheduled
2018-06-21 15:12hgbotCheckin
2018-06-21 15:12hgbotNote Added: 0105306
2018-06-21 15:12hgbotStatusscheduled => resolved
2018-06-21 15:12hgbotResolutionopen => fixed
2018-06-21 15:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/889587a15d74f0ec4261ceec5a474e6375b51eb0 [^]
2018-06-22 00:34hgbotCheckin
2018-06-22 00:34hgbotNote Added: 0105323
2018-06-22 11:02marvintmReview Assigned To => marvintm
2018-06-22 11:02marvintmStatusresolved => closed
2018-06-22 11:02marvintmFixed in Version => RR18Q3
2018-07-02 16:11hgbotCheckin
2018-07-02 16:11hgbotNote Added: 0105529
2019-06-18 12:29gorka_gilRelationship addedrelated to 0041118
2019-06-18 15:41hgbotCheckin
2019-06-18 15:41hgbotNote Added: 0112864

Notes
(0105306)
hgbot   
2018-06-21 15:12   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: 889587a15d74f0ec4261ceec5a474e6375b51eb0
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Jun 20 23:05:04 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/889587a15d74f0ec4261ceec5a474e6375b51eb0 [^]

Fixed issue 38759: No Terminal is set in the session record in Data Import
Entry window: It can generate DeadLock database error

- A new OpenSessionPREEntryProcessor class was added, to manages the changes into
Import Entry class

---
A src/org/openbravo/retail/sessions/OpenSessionPREEntryProcessor.java
---
(0105323)
hgbot   
2018-06-22 00:34   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: f754228369ca147b7ff97b9944e56dc41ca435b6
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Jun 21 18:33:54 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/f754228369ca147b7ff97b9944e56dc41ca435b6 [^]

Related issue 38759: No Terminal is set in the session record in Data Import
Entry window: It can generate DeadLock database error

- Added throw exception

---
M src/org/openbravo/retail/sessions/OpenSessionPREEntryProcessor.java
---
(0105529)
hgbot   
2018-07-02 16:11   
Repository: tools/automation/pi-mobile
Changeset: 247353b271f62c1e703fd5533145926bfd64c6b8
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Thu Jun 28 15:07:26 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/247353b271f62c1e703fd5533145926bfd64c6b8 [^]

Related to issue 38759: added automated test

---
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/sessions/openstoretill/I38759_VerifySessionDataAfterOpenTill.java
---
(0112864)
hgbot   
2019-06-18 15:41   
Repository: tools/automation/pi-mobile
Changeset: e4e055fe43f3a14506828c6e69d3d305c1af7cf7
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Tue Jun 18 13:11:50 2019 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e4e055fe43f3a14506828c6e69d3d305c1af7cf7 [^]

Related to issue 38759 and issue 41118: Improve test I38759_VerifySessionDataAfterOpenTill
- to not fail with nullPointer
- and only check the import entries of open till, if not it was checking the
entries of terminal instead the ones reported in the issue

Note: this test before the change has help to found the issue 41118,
so probably for issue 41118 interesting to do a test that check that
nothing of retail in c_import_entry has an empty terminal id

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/sessions/openstoretill/I38759_VerifySessionDataAfterOpenTill.java
---