Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029189Openbravo ERP04. Warehouse managementpublic2015-02-27 14:162015-04-01 08:31
umartirena 
umartirena 
urgentmajorhave not tried
closedfixed 
5
 
3.0PR15Q1.23.0PR15Q1.2 
Sandrahuguet
Core
No
0029189: [Cost Adjustments] org.hibernate.LazyInitializationException error while calculating BOM Product Cost
org.hibernate.LazyInitializationException error is obtained while calculating BOM Product Cost.

This is the error obtained:

ERROR org.openbravo.costing.CostingBackground - failed to lazily initialize a collection of role: ManufacturingProductionLine.materialMgmtMaterialTransactionList, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: ManufacturingProductionLine.materialMgmtMaterialTransactionList, 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.costing.CostingAlgorithm.getBOMProductCost(CostingAlgorithm.java:493)
    at org.openbravo.costing.CostingAlgorithm.getTransactionCost(CostingAlgorithm.java:141)
    at org.openbravo.costing.AverageAlgorithm.getTransactionCost(AverageAlgorithm.java:45)
    at org.openbravo.costing.CostingServer.process(CostingServer.java:104)
    at org.openbravo.costing.CostingBackground.doExecute(CostingBackground.java:105)
    at org.openbravo.service.db.DalBaseProcess.execute(DalBaseProcess.java:80)
    at org.openbravo.scheduling.DefaultJob.execute(DefaultJob.java:58)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
We have an environment of a client in which this problem happens. As the scenario is quite complex to reproduce in live.builds, it is possible to reproduce on that environment.
Approved
blocks defect 0029093 closed umartirena [Cost Adjustments] org.hibernate.LazyInitializationException error while calculating BOM Product Cost 
Issue History
2015-03-09 09:22umartirenaTypedefect => backport
2015-03-09 09:22umartirenaTarget Version => 3.0PR15Q1.2
2015-03-09 20:02dmitry_mezentsevTag Attached: Approved
2015-03-25 08:51hgbotCheckin
2015-03-25 08:51hgbotNote Added: 0075956
2015-03-25 08:51hgbotStatusscheduled => resolved
2015-03-25 08:51hgbotResolutionopen => fixed
2015-03-25 08:51hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/643bf6486d11c3ef4124a34b60652b45b85b7992 [^] => http://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/a22462331bafdb09639b8c453228dddcfa941e67 [^]
2015-03-25 08:52SandrahuguetReview Assigned To => Sandrahuguet
2015-03-25 08:52SandrahuguetNote Added: 0075957
2015-03-25 08:52SandrahuguetStatusresolved => closed
2015-03-25 08:52SandrahuguetFixed in Version => 3.0PR15Q1.2
2015-04-01 08:10hgbotCheckin
2015-04-01 08:10hgbotNote Added: 0076239
2015-04-01 08:10hgbotStatusclosed => resolved
2015-04-01 08:10hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/a22462331bafdb09639b8c453228dddcfa941e67 [^] => http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/a22462331bafdb09639b8c453228dddcfa941e67 [^]
2015-04-01 08:31priyamStatusresolved => closed
2015-04-01 08:31priyamNote Added: 0076250

Notes
(0075956)
hgbot   
2015-03-25 08:51   
Repository: erp/backports/3.0PR15Q1.2
Changeset: a22462331bafdb09639b8c453228dddcfa941e67
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Fri Feb 27 14:51:17 2015 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/a22462331bafdb09639b8c453228dddcfa941e67 [^]

Fixes bug 29189: LazyInitializationException avoided calculating BOM prod. cost

prodLine has been reloaded in case cost calculation of previous BOM Product has cleared the session.

---
M src/org/openbravo/costing/CostingAlgorithm.java
---
(0075957)
Sandrahuguet   
2015-03-25 08:52   
Code review + testing OK
(0076239)
hgbot   
2015-04-01 08:10   
Repository: erp/backports/3.0PR15Q2
Changeset: a22462331bafdb09639b8c453228dddcfa941e67
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Fri Feb 27 14:51:17 2015 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/a22462331bafdb09639b8c453228dddcfa941e67 [^]

Fixes bug 29189: LazyInitializationException avoided calculating BOM prod. cost

prodLine has been reloaded in case cost calculation of previous BOM Product has cleared the session.

---
M src/org/openbravo/costing/CostingAlgorithm.java
---
(0076250)
priyam   
2015-04-01 08:31   
closed again, as the status changed due the merge tag of 3.0PR15Q1.2 to backports/3.0PR15Q2