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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033405
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2016-07-01 11:282016-07-24 22:51
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionduplicateFixed in VersionRR16Q4
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionRR16Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033405: When using multi-server in non-synchronized mode: tickets are duplicated twice: through import entry and directly

DescriptionWhen running multi-server and in non-synchronized mode then tickets are replicated twice:
- from transactional table replication
- through import entry replication

Steps To ReproduceInstall multi-server
Do not set synchronized mode
Create a ticket in webpos

See the stacktrace:
1971119 [Import Entry - 4] ERROR org.hibernate.util.JDBCExceptionReporter - Batch entry 0 insert into C_Order (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, IsSOTrx, DocumentNo, DocStatus, DocAction, Processing, Processed, C_DocType_ID, C_DocTypeTarget_ID, Description, IsDelivered, IsInvoiced, IsPrinted, IsSelected, SalesRep_ID, DateOrdered, DatePromised, DateAcct, C_BPartner_ID, BillTo_ID, C_BPartner_Location_ID, IsDiscountPrinted, C_Currency_ID, PaymentRule, C_PaymentTerm_ID, InvoiceRule, DeliveryRule, FreightCostRule, DeliveryViaRule, ChargeAmt, PriorityRule, TotalLines, GrandTotal, M_Warehouse_ID, M_PriceList_ID, IsTaxIncluded, Posted, AD_User_ID, CopyFrom, IsSelfService, Generatetemplate, CopyFromPO, FIN_Paymentmethod_ID, RM_PickFromShipment, RM_ReceiveMaterials, RM_CreateInvoice, RM_AddOrphanLine, Calculate_Promotions, EM_OBSCNTR_Processorder, Convertquotation, Create_POLines, EM_Obdisc_Addpack, Iscashvat, RM_Pickfromreceipt, EM_APRM_AddPayment, EM_Obwpl_Generatepicking, EM_Obpos_Applications_ID, EM_Obwpl_Isinpickinglist, EM_Obpos_Sendemail, EM_Obwpl_Readypl, EM_Poss_Businessdate, EM_Obpos_App_Cashup_ID, EM_Obpos_Createdabsolute, EM_OBPOS_NotInvoiceOnCashUp, EM_Obpos_Isdeleted, C_Order_ID) values ('39363B0921BB4293B48383844325E84C', 'D270A5AC50874F8BA67A88EE977F8E3B', 'Y', '2016-7-1 11:24:38.000000 +2:0:0', '3073EDF96A3C42CC86C7069E379522D2', '2016-7-1 11:24:51.721000 +2:0:0', '3073EDF96A3C42CC86C7069E379522D2', 'Y', 'VBS1/0000202', 'CO', '--', 'N', 'Y', '511A9371A0F74195AA3F6D66C722729D', '511A9371A0F74195AA3F6D66C722729D', '', 'Y', 'N', 'Y', 'N', '3073EDF96A3C42CC86C7069E379522D2', '2016-7-1 0:0:0.000000 +2:0:0', '2016-7-1 0:0:0.000000 +2:0:0', '2016-7-1 0:0:0.000000 +2:0:0', 'ABD91C9D3BC94175B876FBBE9CACA008', '2AA7EADDF7EC405899262DDA3E572436', '2AA7EADDF7EC405899262DDA3E572436', 'N', '102', 'B', 'D8955F8808A54C63BBF478A6843D834D', 'I', 'A', 'I', 'P', '0', '5', '3.93', '4.75', 'CE7AB151695342FF879938F837F12E6E', '496CF965DF9744D2A41248392D1DE407', 'Y', 'N', '032576220FC44B0DA80145B3265E4D9A', 'N', 'N', 'N', 'N', '45A202BF44884F05B8A1BF741E2063B6', 'N', 'N', 'N', 'N', 'N', 'CO', 'N', 'N', 'N', 'N', 'N', 'N', 'N', '9104513C2D0741D4850AE8493998A7C8', 'N', 'N', 'N', '2016-6-27 0:0:0.000000 +2:0:0', 'B38319A30F6ADEB4FC03CBB5DC62DD19', '2016-7-1 11:24:38.748000 +2:0:0', 'N', 'N', '39C6F62F8891161FBA75CBACCFACCBD5') was aborted. Call getNextException to see the cause.
1971120 [Import Entry - 4] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: duplicate key value violates unique constraint "c_order_key"
  Detail: Key (c_order_id)=(39C6F62F8891161FBA75CBACCFACCBD5) already exists.
1971121 [Import Entry - 4] ERROR org.openbravo.base.exception.OBException - Error in OrderLoader when getting stock for product 7A056733960A465183A4336F36E85D30 order line C4BFB7C6266767FFE51D91B8E7BF338B
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "c_order_key"
  Detail: Key (c_order_id)=(39C6F62F8891161FBA75CBACCFACCBD5) already exists.
    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.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
    at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
    at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2411)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2868)
    at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
    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:205)
    at org.openbravo.dal.service.OBDal.getConnection(OBDal.java:146)
    at org.openbravo.materialmgmt.StockUtils.getStock(StockUtils.java:40)
    at org.openbravo.retail.posterminal.OrderLoader.callProcessGetStock(OrderLoader.java:2355)
    at org.openbravo.retail.posterminal.OrderLoader.createShipmentLines(OrderLoader.java:1092)
    at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:371)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:198)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:155)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:87)
    at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:42)
    at org.openbravo.retail.posterminal.importprocess.OrderImportEntryProcessor$OrderLoaderRunnable.processEntry(OrderImportEntryProcessor.java:59)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:370)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:292)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
1971121 [Import Entry - 4] ERROR org.openbravo.base.exception.OBException - Error in OrderLoader:
org.openbravo.base.exception.OBException: Error in OrderLoader when getting stock for product 7A056733960A465183A4336F36E85D30 order line C4BFB7C6266767FFE51D91B8E7BF338B
    at org.openbravo.retail.posterminal.OrderLoader.callProcessGetStock(OrderLoader.java:2365)
    at org.openbravo.retail.posterminal.OrderLoader.createShipmentLines(OrderLoader.java:1092)
    at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:371)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:198)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:155)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:87)
    at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:42)
    at org.openbravo.retail.posterminal.importprocess.OrderImportEntryProcessor$OrderLoaderRunnable.processEntry(OrderImportEntryProcessor.java:59)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:370)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:292)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "c_order_key"
  Detail: Key (c_order_id)=(39C6F62F8891161FBA75CBACCFACCBD5) already exists.
    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.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
    at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
    at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2411)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2868)
    at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
    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:205)
    at org.openbravo.dal.service.OBDal.getConnection(OBDal.java:146)
    at org.openbravo.materialmgmt.StockUtils.getStock(StockUtils.java:40)
    at org.openbravo.retail.posterminal.OrderLoader.callProcessGetStock(OrderLoader.java:2355)
    ... 14 more
1971127 [Import Entry - 4] ERROR org.hibernate.util.JDBCExceptionReporter - Batch entry 0 insert into C_Order (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, IsSOTrx, DocumentNo, DocStatus, DocAction, Processing, Processed, C_DocType_ID, C_DocTypeTarget_ID, Description, IsDelivered, IsInvoiced, IsPrinted, IsSelected, SalesRep_ID, DateOrdered, DatePromised, DateAcct, C_BPartner_ID, BillTo_ID, C_BPartner_Location_ID, IsDiscountPrinted, C_Currency_ID, PaymentRule, C_PaymentTerm_ID, InvoiceRule, DeliveryRule, FreightCostRule, DeliveryViaRule, ChargeAmt, PriorityRule, TotalLines, GrandTotal, M_Warehouse_ID, M_PriceList_ID, IsTaxIncluded, Posted, AD_User_ID, CopyFrom, IsSelfService, Generatetemplate, CopyFromPO, FIN_Paymentmethod_ID, RM_PickFromShipment, RM_ReceiveMaterials, RM_CreateInvoice, RM_AddOrphanLine, Calculate_Promotions, EM_OBSCNTR_Processorder, Convertquotation, Create_POLines, EM_Obdisc_Addpack, Iscashvat, RM_Pickfromreceipt, EM_APRM_AddPayment, EM_Obwpl_Generatepicking, EM_Obpos_Applications_ID, EM_Obwpl_Isinpickinglist, EM_Obpos_Sendemail, EM_Obwpl_Readypl, EM_Poss_Businessdate, EM_Obpos_App_Cashup_ID, EM_Obpos_Createdabsolute, EM_OBPOS_NotInvoiceOnCashUp, EM_Obpos_Isdeleted, C_Order_ID) values ('39363B0921BB4293B48383844325E84C', 'D270A5AC50874F8BA67A88EE977F8E3B', 'Y', '2016-7-1 11:24:38.000000 +2:0:0', '3073EDF96A3C42CC86C7069E379522D2', '2016-7-1 11:24:51.721000 +2:0:0', '3073EDF96A3C42CC86C7069E379522D2', 'Y', 'VBS1/0000202', 'CO', '--', 'N', 'Y', '511A9371A0F74195AA3F6D66C722729D', '511A9371A0F74195AA3F6D66C722729D', '', 'Y', 'N', 'Y', 'N', '3073EDF96A3C42CC86C7069E379522D2', '2016-7-1 0:0:0.000000 +2:0:0', '2016-7-1 0:0:0.000000 +2:0:0', '2016-7-1 0:0:0.000000 +2:0:0', 'ABD91C9D3BC94175B876FBBE9CACA008', '2AA7EADDF7EC405899262DDA3E572436', '2AA7EADDF7EC405899262DDA3E572436', 'N', '102', 'B', 'D8955F8808A54C63BBF478A6843D834D', 'I', 'A', 'I', 'P', '0', '5', '3.93', '4.75', 'CE7AB151695342FF879938F837F12E6E', '496CF965DF9744D2A41248392D1DE407', 'Y', 'N', '032576220FC44B0DA80145B3265E4D9A', 'N', 'N', 'N', 'N', '45A202BF44884F05B8A1BF741E2063B6', 'N', 'N', 'N', 'N', 'N', 'CO', 'N', 'N', 'N', 'N', 'N', 'N', 'N', '9104513C2D0741D4850AE8493998A7C8', 'N', 'N', 'N', '2016-6-27 0:0:0.000000 +2:0:0', 'B38319A30F6ADEB4FC03CBB5DC62DD19', '2016-7-1 11:24:38.748000 +2:0:0', 'N', 'N', '39C6F62F8891161FBA75CBACCFACCBD5') was aborted. Call getNextException to see the cause.
1971127 [Import Entry - 4] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: current transaction is aborted, commands ignored until end of transaction block
1971132 [Import Entry - 4] WARN org.openbravo.mobile.core.process.DataSynchronizationProcess - Record in process org.openbravo.retail.posterminal.OrderLoader duplicated with id: 39C6F62F8891161FBA75CBACCFACCBD5 Error not saved.
Proposed SolutionSomehow prevent import entry replication if the store server module uses transactional replication.

Maybe introduce preference for this to control this behavior.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
duplicate of design defect 0033534RR16Q4 closedmtaal In non-synchronized mode and webpos using storeserver synchronization module both import entry an transactional tables are sync 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2016-07-01 11:28 mtaal New Issue
2016-07-01 11:28 mtaal Assigned To => mtaal
2016-07-01 11:28 mtaal Triggers an Emergency Pack => No
2016-07-24 22:51 mtaal Relationship added duplicate of 0033534
2016-07-24 22:51 mtaal Status new => closed
2016-07-24 22:51 mtaal Resolution open => duplicate
2016-07-24 22:51 mtaal Fixed in Version => RR16Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker