Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024842Openbravo ERPA. Platformpublic2013-09-27 15:442013-09-30 21:40
alostale 
alostale 
immediateminorhave not tried
closedfixed 
5
 
3.0MP283.0MP28 
shankarb
Core
Production - Confirmed Stable
2013-01-21
https://code.openbravo.com/erp/devel/pi/rev/d64833c3f0c1e44ad1b055af00e6217101d56ff8 [^]
No
0024842: custom query selector raises LazyInitializationException
Under some circumstances custom query selectors can throw a LazyInitializationException when trying to get records in drop downs list.
- Create a new Custom Query Selector WITHOUT @additional_filters@ and ensuring the resultset it will be obtained in >100 records
- Add some fields to this selector
- Associate it to a column
- Try to open drop down list for that selector. This exception is thrown:
1f923ef8 9170494 [http-8080-12] ERROR org.openbravo.client.kernel.KernelUtils - failed to lazily initialize a collection of role: OBUISEL_Selector.oBUISELSelectorFieldList, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: OBUISEL_Selector.oBUISELSelectorFieldList, no session or session was closed
    at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:383)
    at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:375)
    at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:368)
    at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:111)
    at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272)
    at org.openbravo.userinterface.selector.CustomQuerySelectorDatasource.getData(CustomQuerySelectorDatasource.java:142)
Workaround:
  1. @additional_filters@ should always be included in HQL
  2. Even if not included, selector popup can be used
No tags attached.
Issue History
2013-09-27 15:44alostaleNew Issue
2013-09-27 15:44alostaleAssigned To => alostale
2013-09-27 15:44alostaleModules => Core
2013-09-27 15:44alostaleTriggers an Emergency Pack => No
2013-09-27 15:47alostaleReview Assigned To => shankarb
2013-09-27 15:47alostaleRegression level => Production - Confirmed Stable
2013-09-27 15:47alostaleRegression date => 2013-01-21
2013-09-27 15:47alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/d64833c3f0c1e44ad1b055af00e6217101d56ff8 [^]
2013-09-27 15:51hgbotCheckin
2013-09-27 15:51hgbotNote Added: 0061453
2013-09-27 15:51hgbotStatusnew => resolved
2013-09-27 15:51hgbotResolutionopen => fixed
2013-09-27 15:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9c7cda930438ab886a3cb54091ffaacf5e2eecd4 [^]
2013-09-30 10:57shankarbNote Added: 0061472
2013-09-30 10:57shankarbStatusresolved => closed
2013-09-30 10:57shankarbFixed in Version => 3.0MP28
2013-09-30 21:40hudsonbotCheckin
2013-09-30 21:40hudsonbotNote Added: 0061499

Notes
(0061453)
hgbot   
2013-09-27 15:51   
Repository: erp/devel/pi
Changeset: 9c7cda930438ab886a3cb54091ffaacf5e2eecd4
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Sep 27 15:49:39 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9c7cda930438ab886a3cb54091ffaacf5e2eecd4 [^]

fixed bug 24842: custom query selector raises LazyInitializationException

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
---
(0061472)
shankarb   
2013-09-30 10:57   
Code reviewed and verified in pi changeset cf9005633e4f.
(0061499)
hudsonbot   
2013-09-30 21:40   
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/efb12cdf8699 [^]

Maturity status: Test