Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035057Openbravo ERPA. Platformpublic2017-01-26 11:582017-03-15 20:18
alostale 
caristu 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR17Q2 
alostale
Core
Pre packaging ( pi )
2017-01-23
pi
http://code.openbravo.com/erp/devel/pi/rev/84e7958bae798b41046be8e1ed65ab7af1705587 [^]
No
0035057: potential NPE on trx rollback
SessionHandler rollbacks transaction and closes connection if not closed, it's also trying to close it in case it's null which will throw NPE.
check https://code.openbravo.com/erp/devel/pi/file/09fe534692aa/src/org/openbravo/dal/core/SessionHandler.java#l684 [^]
No tags attached.
caused by feature request 0034816 closed caristu Support a second database for reporting 
Issue History
2017-01-26 11:58alostaleNew Issue
2017-01-26 11:58alostaleAssigned To => platform
2017-01-26 11:58alostaleModules => Core
2017-01-26 11:58alostaleTriggers an Emergency Pack => No
2017-01-26 12:00alostaleRelationship addedcaused by 0034816
2017-01-26 12:00alostaleReview Assigned To => caristu
2017-01-26 12:00alostaleRegression level => Pre packaging ( pi )
2017-01-26 12:00alostaleRegression date => 2017-01-23
2017-01-26 12:00alostaleRegression introduced in release => pi
2017-01-26 12:02alostaleRegression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/84e7958bae798b41046be8e1ed65ab7af1705587 [^]
2017-01-26 12:02alostaleAssigned Toplatform => alostale
2017-01-26 12:04hgbotCheckin
2017-01-26 12:04hgbotNote Added: 0093837
2017-01-26 12:04hgbotStatusnew => resolved
2017-01-26 12:04hgbotResolutionopen => fixed
2017-01-26 12:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8d8ea0ed22b64673d8a56c7ac03a301159c6e311 [^]
2017-01-26 12:13hgbotCheckin
2017-01-26 12:13hgbotNote Added: 0093838
2017-01-27 12:26caristuAssigned Toalostale => caristu
2017-01-27 12:27hgbotCheckin
2017-01-27 12:27hgbotNote Added: 0093880
2017-01-27 12:28caristuReview Assigned Tocaristu => alostale
2017-02-03 08:42alostaleNote Added: 0094026
2017-02-03 08:42alostaleStatusresolved => closed
2017-02-03 08:42alostaleFixed in Version => 3.0PR17Q2
2017-03-15 20:18hudsonbotCheckin
2017-03-15 20:18hudsonbotNote Added: 0095120
2017-03-15 20:18hudsonbotCheckin
2017-03-15 20:18hudsonbotNote Added: 0095121
2017-03-15 20:18hudsonbotCheckin
2017-03-15 20:18hudsonbotNote Added: 0095124

Notes
(0093837)
hgbot   
2017-01-26 12:04   
Repository: erp/devel/pi
Changeset: 8d8ea0ed22b64673d8a56c7ac03a301159c6e311
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jan 26 12:03:58 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8d8ea0ed22b64673d8a56c7ac03a301159c6e311 [^]

fixed bug 35057: potential NPE on trx rollback

---
M src/org/openbravo/dal/core/SessionHandler.java
---
(0093838)
hgbot   
2017-01-26 12:13   
Repository: erp/devel/pi
Changeset: e7a491adc463ac711e6978c8d1b6fada08731d72
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Jan 26 12:13:07 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e7a491adc463ac711e6978c8d1b6fada08731d72 [^]

related to bug 35057: check also if trx is null

---
M src/org/openbravo/dal/core/SessionHandler.java
---
(0093880)
hgbot   
2017-01-27 12:27   
Repository: erp/devel/pi
Changeset: 7bd93800da74ece8a75ab41c025256ed1b5ba4a5
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Jan 27 12:20:33 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7bd93800da74ece8a75ab41c025256ed1b5ba4a5 [^]

related to bug 35057: keep check invariant in rollback

After the changes introduced on issue 0034816, SessionHandler.getInstance() does not begin a session when the handler was not already initilized. This causes that the checkInvariant throws an exception when calling rollback() after commitAndClose(), because the session is null when calling rollback().

The problem here was that OBBaseTest was doing that,i.e., invoking rollback inside a catch block when commitAndClose() fails. This is not needed, because when commitAndClose() fails the rollback of the transaction is done in that very same method.

For this reason, we are keeping the checkInvariant invocation in the rollback method, and we are deleting the usage of rollback() in the catch block in OBBaseTest.

---
M src-test/src/org/openbravo/test/base/OBBaseTest.java
M src/org/openbravo/dal/core/SessionHandler.java
---
(0094026)
alostale   
2017-02-03 08:42   
code reviewed
(0095120)
hudsonbot   
2017-03-15 20:18   
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/54e102bef53e [^]
Maturity status: Test
(0095121)
hudsonbot   
2017-03-15 20:18   
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/54e102bef53e [^]
Maturity status: Test
(0095124)
hudsonbot   
2017-03-15 20:18   
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/54e102bef53e [^]
Maturity status: Test