Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031959Openbravo ERPA. Platformpublic2016-01-19 21:212016-03-17 10:54
egoitz 
caristu 
immediatecriticalalways
closedfixed 
5
3.0PR15Q4 
3.0PR16Q2 
alostale
Core
Production - QA Approved
2015-07-06
3.0PR15Q4
https://code.openbravo.com/erp/devel/pi/rev/70c0e8fd87ee [^]
No
0031959: Incorrect posting data when not defining an external connection pool on the Openbravo.properties
Having on the Openbravo.properties file the parameter without value the documents are posted on the previous date than the accounting date.

The configuration is:


externalPoolClassName=
The problem happens by default when updating to PR15Q4.

It is reproducible as:

Edit the Openbravo.properties file by replacing


externalPoolClassName=org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool

with

externalPoolClassName=

Then compile with
ant smartbuild
and restart tomcat.
Then access to the application.

Reset accounting for invoices
Schedule the accoounting background process.

When it finishes check the invoices and see that the accounting date of the fact_acct entries is one day before the accounting date of the documents.

REstoring the Openbravo.properties file solves the problem.
No tags attached.
depends on backport 00319603.0PR16Q1 closed caristu Incorrect posting data when not defining an external connection pool on the Openbravo.properties 
depends on backport 00319613.0PR15Q4.2 closed caristu Incorrect posting data when not defining an external connection pool on the Openbravo.properties 
caused by feature request 00295643.0PR15Q4 closed inigosanchez Include Connection Pool module into distribution 
related to defect 0031973 closed alostale detect situation created by issue 31959 
related to defect 0032432 closed alostale incorrect dates issue detection on install.source 
Issue History
2016-01-19 21:21egoitzNew Issue
2016-01-19 21:21egoitzAssigned To => platform
2016-01-19 21:21egoitzModules => Core
2016-01-19 21:21egoitzRegression level => Production - QA Approved
2016-01-19 21:21egoitzTriggers an Emergency Pack => No
2016-01-19 21:22egoitzversion => 3.0PR15Q4
2016-01-19 21:22egoitzTarget Version3.0PR15Q4 =>
2016-01-20 09:06alostaleRelationship addedcaused by 0029564
2016-01-20 09:08alostaleRegression date => 2015-07-06
2016-01-20 09:08alostaleRegression introduced in release => 3.0PR15Q4
2016-01-20 09:08alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/30caa81f847ba1075d2b6e716fb1e4e8158dafe7 [^]
2016-01-20 09:08alostaleStatusnew => acknowledged
2016-01-20 09:08alostaleAssigned Toplatform => caristu
2016-01-20 09:09alostaleStatusacknowledged => scheduled
2016-01-20 19:27hgbotCheckin
2016-01-20 19:27hgbotNote Added: 0083470
2016-01-20 19:27hgbotStatusscheduled => resolved
2016-01-20 19:27hgbotResolutionopen => fixed
2016-01-20 19:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c488406083784aae17d1d93bdf0495d469c54225 [^]
2016-01-20 19:33caristuReview Assigned To => alostale
2016-01-20 19:33caristuIssue Monitored: alostale
2016-01-21 08:18alostaleRegression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/30caa81f847ba1075d2b6e716fb1e4e8158dafe7 [^] => https://code.openbravo.com/erp/devel/pi/rev/70c0e8fd87ee [^]
2016-01-21 08:31alostaleNote Added: 0083480
2016-01-21 08:31alostaleNote Added: 0083481
2016-01-21 08:40alostaleNote Added: 0083483
2016-01-21 08:40alostaleStatusresolved => closed
2016-01-21 08:40alostaleFixed in Version => 3.0PR16Q2
2016-01-21 08:42alostaleNote Deleted: 0083481
2016-01-21 11:05alostaleRelationship addedrelated to 0031973
2016-01-21 14:05hgbotCheckin
2016-01-21 14:05hgbotNote Added: 0083497
2016-01-21 14:06hgbotCheckin
2016-01-21 14:06hgbotNote Added: 0083499
2016-01-21 14:07hgbotCheckin
2016-01-21 14:07hgbotNote Added: 0083501
2016-01-21 15:18alostaleNote Added: 0083503
2016-03-08 08:28alostaleRelationship addedrelated to 0032432
2016-03-17 10:54hudsonbotCheckin
2016-03-17 10:54hudsonbotNote Added: 0085060
2016-03-17 10:54hudsonbotCheckin
2016-03-17 10:54hudsonbotNote Added: 0085063

Notes
(0083470)
hgbot   
2016-01-20 19:27   
Repository: erp/devel/pi
Changeset: c488406083784aae17d1d93bdf0495d469c54225
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Jan 20 18:52:48 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c488406083784aae17d1d93bdf0495d469c54225 [^]

fixes issue 31959: Incorrect posting data using postgresql jdbc connection pool


There was a problem in the binary transfer of Dates performed by the postgresql library version 9.4-1201. This problem is not happening on version 9.4-1207 because when the queries are executed it now includes a mechanism to identify if the fields of the query need to update their format to binary.

For this reason, to fix the problem the postgresql jdbc driver has been upgraded to version 9.4-1207

---
M build.xml
M legal/Licensing.txt
A lib/runtime/postgresql-9.4.1207.jre6.jar
R lib/runtime/postgresql-9.4-1201.jdbc4.jar
---
(0083480)
alostale   
2016-01-21 08:31   
This issue affects PostgreSQL instances using Apache Commons DBCP Pool, this is externalPoolClassName property in Openbravo.properties is empty, which is the default values for instances updating to >=PR15Q4 from a previous version. Note that even this value is changed to use Tomcat Pool, if the instance was executing old value for a time, data generated in this period might be affected.

It affects accounting process. But it can also affect ANY other process implemented in XSQL (or using direct JDBC connections) doing operations on date fields read from database. It DOES NOT affect processes using DAL nor PL/SQL processes.

It is caused by issues 376 [1] and 387 [2] in PostgreSQL JDB.

[1] https://github.com/pgjdbc/pgjdbc/pull/376 [^]
[2] https://github.com/pgjdbc/pgjdbc/pull/387 [^]
(0083483)
alostale   
2016-01-21 08:40   
Code reviewed

Tested accounting process using Commons DBCP and Tomcat pool, in both cases there are not mismatches in accounting dates.
(0083497)
hgbot   
2016-01-21 14:05   
Repository: erp/devel/pi
Changeset: f8de3bcd78f39e8591a0c0f268a206c4cfdb3298
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jan 21 12:44:16 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f8de3bcd78f39e8591a0c0f268a206c4cfdb3298 [^]

fixed issue 31973: detect situation created by issue 31959

  Added module script that creates alert when in this situation

---
A src-util/modulescript/build/classes/org/openbravo/modulescript/PgJdbcDatesIssue.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/PgJdbcDatesIssueData.class
A src-util/modulescript/src/org/openbravo/modulescript/PgJdbcDatesIssue.java
A src-util/modulescript/src/org/openbravo/modulescript/PgJdbcDatesIssue_data.xsql
---
(0083499)
hgbot   
2016-01-21 14:06   
Repository: erp/backports/3.0PR15Q4.2
Changeset: 51a2befdaed15dc4d765e841eb0695974ce562ca
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jan 21 13:57:04 2016 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q4.2/rev/51a2befdaed15dc4d765e841eb0695974ce562ca [^]

fixed issue 31975: detect situation created by issue 31959

  Added module script that creates alert when in this situation

---
A src-util/modulescript/build/classes/org/openbravo/modulescript/PgJdbcDatesIssue.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/PgJdbcDatesIssueData.class
A src-util/modulescript/src/org/openbravo/modulescript/PgJdbcDatesIssue.java
A src-util/modulescript/src/org/openbravo/modulescript/PgJdbcDatesIssue_data.xsql
---
(0083501)
hgbot   
2016-01-21 14:07   
Repository: erp/backports/3.0PR16Q1
Changeset: 83073641d170a8f789b483bdcc4a14bc0a927bbf
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jan 21 12:44:16 2016 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR16Q1/rev/83073641d170a8f789b483bdcc4a14bc0a927bbf [^]

fixed issue 31974: detect situation created by issue 31959

  Added module script that creates alert when in this situation

---
A src-util/modulescript/build/classes/org/openbravo/modulescript/PgJdbcDatesIssue.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/PgJdbcDatesIssueData.class
A src-util/modulescript/src/org/openbravo/modulescript/PgJdbcDatesIssue.java
A src-util/modulescript/src/org/openbravo/modulescript/PgJdbcDatesIssue_data.xsql
---
(0083503)
alostale   
2016-01-21 15:18   
for more details http://wiki.openbravo.com/wiki/Release_Notes/Issue31959 [^]
(0085060)
hudsonbot   
2016-03-17 10:54   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test
(0085063)
hudsonbot   
2016-03-17 10:54   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b22fb0500156 [^]
Maturity status: Test