Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||||||||
View Issue Details | |||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||
0026288 | Openbravo ERP | A. Platform | public | 2014-04-15 16:00 | 2014-05-07 18:11 | ||||||||||||||
Reporter | AugustoMauch | ||||||||||||||||||
Assigned To | AtulOpenbravo | ||||||||||||||||||
Priority | immediate | Severity | critical | Reproducibility | have not tried | ||||||||||||||
Status | closed | Resolution | fixed | ||||||||||||||||
Platform | OS | 5 | OS Version | ||||||||||||||||
Product Version | |||||||||||||||||||
Target Version | 3.0PR14Q2 | Fixed in Version | |||||||||||||||||
Merge Request Status | |||||||||||||||||||
Review Assigned To | pramakrishnan | ||||||||||||||||||
OBNetwork customer | No | ||||||||||||||||||
Web browser | |||||||||||||||||||
Modules | Core | ||||||||||||||||||
Support ticket | |||||||||||||||||||
Regression level | Coding ( Testing ) | ||||||||||||||||||
Regression date | 2014-02-13 | ||||||||||||||||||
Regression introduced in release | |||||||||||||||||||
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/2356d30e0be7c80bcca638071842f5e219037357 [^] | ||||||||||||||||||
Triggers an Emergency Pack | No | ||||||||||||||||||
Summary | 0026288: Initial Organization Setup process does not work using PostgreSQL 8.4 | ||||||||||||||||||
Description | The Initial Organization Setup process does not work using PostgreSQL 8.4. When this process is executed having selected reference data, this error is logged: 370461 [http-8080-5] ERROR org.hibernate.util.JDBCExceptionReporter - Batch entry 0 insert into C_AcctSchema_Element (IsActive, Created, CreatedBy, Updated, AD_Org_ID, UpdatedBy, C_AcctSchema_ID, ElementType, Name, SeqNo, C_Element_ID, AD_Client_ID, IsMandatory, IsBalanced, C_AcctSchema_Element_ID) values ('Y', '2014-04-15 15:41:34.199000 +02:00:00', '100', '2014-04-15 15:41:34.199000 +02:00:00', '36504E212B274E558095970C3CA76591', '100', '19A0E2076C0E451AA242253D842DBB0D', 'AC', 'Account', '20', '4A424A4A8E8D4019A60A329A6F05DC97', '23C59575B9CF467C9620760EB255B389', 'Y', 'N', '3C8AC746E1AF40F1839F66E79EC20A91') was aborted. Call getNextException to see the cause. 370462 [http-8080-5] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: record "old" is not assigned yet Detail: The tuple structure of a not-yet-assigned record is indeterminate. Where: PL/pgSQL function "c_acctschema_element_trg" line 47 at IF 370462 [http-8080-5] ERROR org.openbravo.erpCommon.businessUtility.COAUtility - insertAccountingSchema() - Error while creating accounting schema element (general ledger element) for account 370463 [http-8080-5] ERROR org.openbravo.erpCommon.businessUtility.COAUtility - Exception 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.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:205) at org.openbravo.erpCommon.businessUtility.InitialSetupUtility.insertAcctSchemaElement(InitialSetupUtility.java:1135) at org.openbravo.erpCommon.businessUtility.COAUtility.insertAccountingSchema(COAUtility.java:310) at org.openbravo.erpCommon.businessUtility.COAUtility.createAccounting(COAUtility.java:156) at org.openbravo.erpCommon.businessUtility.InitialOrgSetup.createAccounting(InitialOrgSetup.java:526) at org.openbravo.erpCommon.businessUtility.InitialOrgSetup.createOrganization(InitialOrgSetup.java:206) at org.openbravo.erpCommon.ad_forms.InitialOrgSetup.doPost(InitialOrgSetup.java:74) This happens because of this line in the c_acctschema_element_trg trigger function: IF(TG_OP = 'UPDATE' AND COALESCE(NEW.C_Element_ID,'0') <> COALESCE(OLD.C_Element_ID,'0')) THEN PostgreSQL 8.4 does not use Short-circuit evaluation [1], so the OLD record is accessed even when the operation is 'INSERT'. [1] http://en.wikipedia.org/wiki/Short-circuit_evaluation [^] | ||||||||||||||||||
Steps To Reproduce | - Open the Initial Organization Setup process - Fill in the mandatory fields - Select a reference data - Execute the process - The process will fail and the error will be logged. | ||||||||||||||||||
Proposed Solution | Change: IF(TG_OP = 'INSERT') THEN v_CreateCombination:=TRUE; END IF; IF(TG_OP = 'UPDATE' AND COALESCE(NEW.C_Element_ID,'0') <> COALESCE(OLD.C_Element_ID,'0')) THEN v_CreateCombination:=TRUE; END IF; With: IF(TG_OP = 'INSERT') THEN v_CreateCombination:=TRUE; ELSIF(TG_OP = 'UPDATE' AND COALESCE(NEW.C_Element_ID,'0') <> COALESCE(OLD.C_Element_ID,'0')) THEN v_CreateCombination:=TRUE; END IF; | ||||||||||||||||||
Additional Information | |||||||||||||||||||
Tags | No tags attached. | ||||||||||||||||||
Relationships |
| ||||||||||||||||||
Attached Files | |||||||||||||||||||
Issue History | |||||||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||||||
2014-04-15 16:00 | AugustoMauch | New Issue | |||||||||||||||||
2014-04-15 16:00 | AugustoMauch | Assigned To | => AtulOpenbravo | ||||||||||||||||
2014-04-15 16:00 | AugustoMauch | Modules | => Core | ||||||||||||||||
2014-04-15 16:00 | AugustoMauch | OBNetwork customer | => No | ||||||||||||||||
2014-04-15 16:00 | AugustoMauch | Triggers an Emergency Pack | => No | ||||||||||||||||
2014-04-15 16:02 | AugustoMauch | Regression level | => Coding ( Testing ) | ||||||||||||||||
2014-04-15 16:02 | AugustoMauch | Regression date | => 2014-02-13 | ||||||||||||||||
2014-04-15 16:02 | AugustoMauch | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/2356d30e0be7c80bcca638071842f5e219037357 [^] | ||||||||||||||||
2014-04-15 16:02 | AugustoMauch | Relationship added | related to 0025351 | ||||||||||||||||
2014-04-15 16:17 | alostale | Note Added: 0066456 | |||||||||||||||||
2014-04-15 18:29 | AtulOpenbravo | Status | new => scheduled | ||||||||||||||||
2014-04-15 18:29 | AtulOpenbravo | fix_in_branch | => pi | ||||||||||||||||
2014-04-16 10:52 | caristu | Relationship added | has duplicate 0026070 | ||||||||||||||||
2014-04-16 10:57 | caristu | Relationship deleted | has duplicate 0026070 | ||||||||||||||||
2014-04-16 10:58 | caristu | Relationship added | related to 0026070 | ||||||||||||||||
2014-04-16 13:13 | AtulOpenbravo | Review Assigned To | => pramakrishnan | ||||||||||||||||
2014-04-16 13:13 | AtulOpenbravo | fix_in_branch | pi => | ||||||||||||||||
2014-04-16 13:15 | hgbot | Checkin | |||||||||||||||||
2014-04-16 13:15 | hgbot | Note Added: 0066490 | |||||||||||||||||
2014-04-16 13:15 | hgbot | Status | scheduled => resolved | ||||||||||||||||
2014-04-16 13:15 | hgbot | Resolution | open => fixed | ||||||||||||||||
2014-04-16 13:15 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/426835c75f78283df0baa686728ad56939553d90 [^] | ||||||||||||||||
2014-04-16 13:28 | pramakrishnan | Note Added: 0066493 | |||||||||||||||||
2014-04-16 13:28 | pramakrishnan | Status | resolved => closed | ||||||||||||||||
2014-05-07 18:11 | hudsonbot | Checkin | |||||||||||||||||
2014-05-07 18:11 | hudsonbot | Note Added: 0066942 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|