Openbravo Issue Tracking System - Retail Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0030169 | Retail Modules | Web POS | public | 2015-06-12 13:31 | 2015-06-24 15:30 |
Reporter | mtaal | ||||
Assigned To | mtaal | ||||
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | RR15Q3 | Fixed in Version | RR15Q3 | ||
Merge Request Status | |||||
Review Assigned To | migueldejuana | ||||
OBNetwork customer | No | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0030169: Exception hidden because of flush/db actions in finally block | ||||
Description | In the ProcessCashClose class a flush is done in a finally block, if there was an error within the try { } part of the finally block, the flush will again fail and hide the original error. Here is the flush/finally block: https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/c1f82da59d10/src/org/openbravo/retail/posterminal/ProcessCashClose.java#l136 [^] | ||||
Steps To Reproduce | Run stress test in higher volume on a single server. Then the stack trace below is shown in the error window: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) 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.retail.posterminal.ProcessCashClose.saveRecord(ProcessCashClose.java:136) at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:202) at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:159) at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:91) at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:39) at org.openbravo.retail.posterminal.importprocess.CashUpImportEntryProcessor$CashUpRunnable.processEntry(CashUpImportEntryProcessor.java:73) at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:306) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into FIN_Reconciliation (AD_Client_ID, AD_Org_ID, Created, Createdby, Updated, Updatedby, Isactive, FIN_Financial_Account_ID, DocumentNo, C_Doctype_ID, Dateto, Statementdate, Endingbalance, Startingbalance, Docstatus, Processing, Processed, Posted, Printdetailed, Printsummary, EM_APRM_Process_Reconciliation, EM_APRM_PrintDetailed, EM_APRM_PrintSummary, EM_Aprm_Process_Rec, EM_APRM_Process_Rec_Force, FIN_Reconciliation_ID) values ('39363B0921BB4293B48383844325E84C', 'D270A5AC50874F8BA67A88EE977F8E3B', '2015-06-12 11:18:58.914000 +00:00:00', '3073EDF96A3C42CC86C7069E379522D2', '2015-06-12 11:18:58.914000 +00:00:00', '3073EDF96A3C42CC86C7069E379522D2', 'Y', 'D7F15C85A07D48E3ABDB737FA5F8F351', '99999999temp', 'F51F85C5D8F84F60B84A0CE34A0A7642', '2015-06-12 00:00:00.000000 +00:00:00', '2015-06-12 00:00:00.000000 +00:00:00', '0.0', '0.0', 'CO', 'N', 'Y', 'N', 'N', 'N', 'P', 'N', 'N', 'P', 'P', '9F82E47AC7194C749E30461CD1604DA8') was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2598) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2737) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) ... 26 more >>>> Next Exception: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2737) 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.retail.posterminal.ProcessCashClose.saveRecord(ProcessCashClose.java:136) at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:202) at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:159) at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:91) at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:39) at org.openbravo.retail.posterminal.importprocess.CashUpImportEntryProcessor$CashUpRunnable.processEntry(CashUpImportEntryProcessor.java:73) at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:306) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) | ||||
Proposed Solution | Change the finally block to handle the case that an error occurred. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2015-06-12 13:31 | mtaal | New Issue | |||
2015-06-12 13:31 | mtaal | Assigned To | => mtaal | ||
2015-06-12 13:31 | mtaal | OBNetwork customer | => No | ||
2015-06-12 13:31 | mtaal | Triggers an Emergency Pack | => No | ||
2015-06-12 13:43 | mtaal | Note Added: 0078234 | |||
2015-06-13 17:10 | hgbot | Checkin | |||
2015-06-13 17:10 | hgbot | Note Added: 0078263 | |||
2015-06-13 17:10 | hgbot | Status | new => resolved | ||
2015-06-13 17:10 | hgbot | Resolution | open => fixed | ||
2015-06-13 17:10 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ed938b77c5d2fe4b7bef428553def0de94fa936e [^] | ||
2015-06-24 15:30 | migueldejuana | Review Assigned To | => migueldejuana | ||
2015-06-24 15:30 | migueldejuana | Note Added: 0078486 | |||
2015-06-24 15:30 | migueldejuana | Status | resolved => closed | ||
2015-06-24 15:30 | migueldejuana | Fixed in Version | => RR15Q3 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|