Openbravo Issue Tracking System - Modules
View Issue Details
0033429ModulesPayment Aging Balance Reportpublic2016-07-05 12:392016-07-06 13:36
dmiguelez 
aferraz 
urgentmajorsometimes
closedfixed 
20Community Appliance
 
 
vmromanos
0033429: Problems in Aging Balance Report with Oracle due to date formats
There is a problem in the Aging Balance Report with Oracle.
Sometimes it throws the error ora-01843 not a valid month.
But this behavior is not always consistent.

This is happening since we started to use a new ConnectionProvider for launching the query: new DalConnectionProvider(false)

This might be related to some problem while creating a new connection, it might be that the date preferences are not correctly set in the database connection we are using.
Install the latest version of the aging balance module: https://code.openbravo.com/erp/mods/org.openbravo.agingbalance [^]

Go to Receivables Aging Balance.
Launch the report with the parameters:
*Organization: F&B España
*General Ledger: F&B España
*As of date: 27-06-2016
*Show Details: Checked
The rest of the parameters can be set with the default values

It should throw an error:
55585 [http-8081-2] ERROR org.openbravo.base.exception.OBException - Error
javax.servlet.ServletException: @CODE=1843@ORA-01843: not a valid month

    at org.openbravo.agingbalance.ad_reports.AgingDaoData.selectDetail(AgingDaoData.java:492)
    at org.openbravo.agingbalance.ad_reports.AgingDao.getOpenReceivablesAgingScheduleDetails(AgingDao.java:217)
    at org.openbravo.agingbalance.ad_reports.AgingProcess.printPageDetails(AgingProcess.java:391)
    at org.openbravo.agingbalance.ad_reports.AgingProcess.doPost(AgingProcess.java:156)
    at org.openbravo.base.HttpBaseServlet.doGet(HttpBaseServlet.java:294)

This behavior is not always consistent.
There is a patch attached with a functional solution for it, in case any client needs it.

But this issue is reported to be investigated just in case there is a bigger problem hidden.
No tags attached.
related to defect 0033438 closed alostale Openbravo ERP DalConnectionProvider.getTransactionConnection does not obtain connection from common pool 
diff fix.diff (8,137) 2016-07-05 12:39
https://issues.openbravo.com/file_download.php?file_id=9610&type=bug
Issue History
2016-07-05 12:39dmiguelezNew Issue
2016-07-05 12:39dmiguelezAssigned To => platform
2016-07-05 12:39dmiguelezFile Added: fix.diff
2016-07-05 12:39dmiguelezModules => Core
2016-07-05 12:39dmiguelezTriggers an Emergency Pack => No
2016-07-05 15:35alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12612#r12612
2016-07-05 16:40alostaleRelationship addedrelated to 0027878
2016-07-06 10:06alostaleIssue cloned0033438
2016-07-06 10:06alostaleRelationship addedrelated to 0033438
2016-07-06 10:14alostaleRelationship deletedrelated to 0027878
2016-07-06 10:18alostaleNote Added: 0088230
2016-07-06 10:18alostaleAssigned Toplatform => Triage Finance
2016-07-06 12:50vmromanosStatusnew => scheduled
2016-07-06 12:50vmromanosAssigned ToTriage Finance => aferraz
2016-07-06 12:50vmromanosProjectOpenbravo ERP => Modules
2016-07-06 12:52vmromanosCategoryA. Platform => Payment Aging Balance Report
2016-07-06 13:02vmromanosNote Added: 0088235
2016-07-06 13:05vmromanosSeveritycritical => major
2016-07-06 13:35hgbotCheckin
2016-07-06 13:35hgbotNote Added: 0088239
2016-07-06 13:35hgbotStatusscheduled => resolved
2016-07-06 13:35hgbotResolutionopen => fixed
2016-07-06 13:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/eae2aeebcc7e0ed2974264cf62c7e1f891d3c0fc [^]
2016-07-06 13:35hgbotCheckin
2016-07-06 13:35hgbotNote Added: 0088240
2016-07-06 13:36vmromanosReview Assigned To => vmromanos
2016-07-06 13:36vmromanosNote Added: 0088241
2016-07-06 13:36vmromanosStatusresolved => closed

Notes
(0088230)
alostale   
2016-07-06 10:18   
The root cause of the problem is due to issue 0033438 Aging report is using xsql files with "scrollable" type which internally create a transactional connection, which if created from a DalConnectionProvider, does not get properly set session configuration.

Proposal: fix this issue within attached functional changeset, not to be blocked by 0033438
(0088235)
vmromanos   
2016-07-06 13:02   
Test plan:

Launch the report in both Oracle and PG.
Verify you get data
(0088239)
hgbot   
2016-07-06 13:35   
Repository: erp/mods/org.openbravo.agingbalance
Changeset: eae2aeebcc7e0ed2974264cf62c7e1f891d3c0fc
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Jul 06 12:48:00 2016 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/eae2aeebcc7e0ed2974264cf62c7e1f891d3c0fc [^]

Fixed bug 33429: Problems in Aging Balance Report with Oracle due to date formats

This is a workaround for issue 33438. We pass the connection provider from the servlet to avoid this random problems on Oracle only

---
M src/org/openbravo/agingbalance/ad_reports/AgingDao.java
M src/org/openbravo/agingbalance/ad_reports/AgingProcess.java
---
(0088240)
hgbot   
2016-07-06 13:35   
Repository: erp/mods/org.openbravo.agingbalance
Changeset: b3d79d3969658d078630092633bc4cc27bb35893
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Jul 06 13:00:14 2016 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/b3d79d3969658d078630092633bc4cc27bb35893 [^]

Related to issue 33429: increase module version

Actually this is an API change, but we are not increasing the major version to avoid problems in retail integration

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0088241)
vmromanos   
2016-07-06 13:36   
Code review + testing OK

Fixed in module version 3.1.1700 (or higher)