Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0058088Openbravo ERPA. Platformpublic2025-02-27 07:572025-02-27 11:46
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
PR25Q2 
approved
No
Core
No
0058088: Cannot access to organizationInformationList of current context organization
Cannot access to organizationInformationList of current context organization, when trying to access to that property the following error is thrown:

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: Organization.organizationInformationList, could not initialize proxy - no Session
1- Execute the attached jUnit tests that contains a reproducer, it fails
No tags attached.
diff 58088_reproducer.diff (2,258) 2025-02-27 08:13
https://issues.openbravo.com/file_download.php?file_id=20977&type=bug
Issue History
2025-02-27 07:57caristuNew Issue
2025-02-27 07:57caristuAssigned To => caristu
2025-02-27 07:57caristuOBNetwork customer => No
2025-02-27 07:57caristuModules => Core
2025-02-27 07:57caristuTriggers an Emergency Pack => No
2025-02-27 08:13caristuFile Added: 58088_reproducer.diff
2025-02-27 08:19hgbotMerge Request Status => open
2025-02-27 08:19hgbotNote Added: 0176187
2025-02-27 11:46hgbotMerge Request Statusopen => approved
2025-02-27 11:46hgbotResolutionopen => fixed
2025-02-27 11:46hgbotStatusnew => closed
2025-02-27 11:46hgbotFixed in Version => PR25Q2
2025-02-27 11:46hgbotNote Added: 0176210
2025-02-27 11:46hgbotNote Added: 0176211

Notes
(0176187)
hgbot   
2025-02-27 08:19   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1560 [^]
(0176210)
hgbot   
2025-02-27 11:46   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo [^]
Changeset: 9e519c77a8621ad83176b21e5e6302dc9bc4d204
Author: Carlos Aristu <c.aristu@orisha.com>
Date: 27-02-2025 10:09:11
URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/commit/9e519c77a8621ad83176b21e5e6302dc9bc4d204 [^]

fixes BUG-58088: cannot access to the current context org info

  The current organization is cached in OBContext. When accessing to the
organizationInformationList property with a different Hibernate session
from the one that loaded the object in the context a
LazyInitializationException was being thrown.

  Now we initialize the organizationInformationList property when
loading the current organization in OBContext, so it can be safely
accessed later with a different session.

---
M src-test/src/org/openbravo/test/dal/OBContextTest.java
M src/org/openbravo/dal/core/OBContext.java
---
(0176211)
hgbot   
2025-02-27 11:46   
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/openbravo/-/merge_requests/1560 [^]