Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030083Openbravo ERP09. Financial managementpublic2015-06-03 16:292015-06-03 16:30
alostale 
Triage Omni OMS 
normalminorhave not tried
newopen 
5
 
 
Core
No
0030083: TestCosting fails adding one-to-many relationship to M_LandedCost
TestCosting fails if a dal bag (one to many relationship) is added to M_LandedCost having a name that is alphabetically prior to LandedCostCost.

As explained in issue 0029947 Hibernate loads on refresh first bag of the entity, this test assumes this bag is LandedCostCost, if a new bag is added before this one the test fails due to this assumption.
There are 2 ways to reproduce it:

1.a. Install attached module
or
1.b. Apply proposed patch for issue 0029947

After any of these steps:

2. run org.openbravo.test.costing.TestCosting.testCostingLC300
  -> following exception is thrown:
49874 [main] ERROR org.hibernate.LazyInitializationException - failed to lazily initialize a collection of role: LandedCost.landedCostCostList, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: LandedCost.landedCostCostList, 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.get(PersistentBag.java:445)
    at org.openbravo.test.costing.TestCosting.testCostingLC300(TestCosting.java:5386)
When refreshing landedCost variable don't assume LandedCostCostList is going to be refreshed but force it refreshal
No tags attached.
blocks design defect 0029947 acknowledged Triage Platform Base Wrong query launched when OBDal.getInstance.getSession.refresh(Object) 
Issue History
2015-06-03 16:29alostaleNew Issue
2015-06-03 16:29alostaleAssigned To => Triage Finance
2015-06-03 16:29alostaleModules => Core
2015-06-03 16:29alostaleTriggers an Emergency Pack => No
2015-06-03 16:30alostaleRelationship addedblocks 0029947
2015-06-03 16:30alostaleIssue Monitored: alostale

There are no notes attached to this issue.