Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032858Openbravo ERPA. Platformpublic2016-05-04 14:062016-06-17 19:37
gorkaion 
gorkaion 
normalmajorsometimes
closedfixed 
20Gentoo
 
3.0PR16Q3 
alostale
Core
No
0032858: in some scenarios if a entity is updated after a commit and close a LazyInitialization is get on OBInterceptor
OBInterceptor is loading the organization structure by doing "org.getClient().getId()" if the client was cleared from the session without touching the getId() method a LazyInitialization exception is thrown.
reproduced in a custom module process.

- create a new entity in * organization.
- do a commitAndClose
- load an existing entity and update some fields.
- do a flush. -> OBInterceptor is executed to check organizations and the mentioned exception is thrown.
Use DalUtil.getId() to get the client id.
No tags attached.
Issue History
2016-05-04 14:06gorkaionNew Issue
2016-05-04 14:06gorkaionAssigned To => gorkaion
2016-05-04 14:06gorkaionModules => Core
2016-05-04 14:06gorkaionTriggers an Emergency Pack => No
2016-05-04 16:42hgbotCheckin
2016-05-04 16:42hgbotNote Added: 0086184
2016-05-04 16:42hgbotStatusnew => resolved
2016-05-04 16:42hgbotResolutionopen => fixed
2016-05-04 16:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a6cbad47ab80b521388ac1d3a211fe5213fe72bd [^]
2016-05-04 16:43gorkaionReview Assigned To => alostale
2016-05-06 09:17alostaleNote Added: 0086236
2016-05-06 09:17alostaleStatusresolved => closed
2016-05-06 09:17alostaleFixed in Version => 3.0PR16Q3
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087515

Notes
(0086184)
hgbot   
2016-05-04 16:42   
Repository: erp/devel/pi
Changeset: a6cbad47ab80b521388ac1d3a211fe5213fe72bd
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed May 04 16:40:02 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a6cbad47ab80b521388ac1d3a211fe5213fe72bd [^]

Fixed issue 32858.Use DalUtil.getId() to load id of client.

Using DalUtil.getId() we improve the performance and we avoid to load the
Client object in memory. As we don't load it we also skip the potential
LazyInitialization exception if the client is detached from the hibernate
session.

---
M src/org/openbravo/dal/core/OBInterceptor.java
---
(0086236)
alostale   
2016-05-06 09:17   
reviewed
(0087515)
hudsonbot   
2016-06-17 19:37   
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/0dc7be081b1c [^]
Maturity status: Test