Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016758Openbravo ERPA. Platformpublic2011-03-01 12:222011-04-15 14:46
marvintm 
dalsasua 
highminorhave not tried
closedfixed 
5
2.50MP27 
2.50MP292.50MP29 
Core
No
0016758: An exception is always raised when executing Initial Org Setup
When an organization is created using the Initial Organization Setup process, an exception is always raised:


a3196480 213420 [http-8080-4] ERROR org.hibernate.LazyInitializationException - could not initialize proxy - no Session
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
   at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:57)
   at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)
   at org.openbravo.model.ad.utility.Image$$EnhancerByCGLIB$$892906a0.getBindaryData(<generated>)
   at org.openbravo.erpCommon.businessUtility.InitialOrgSetup.addImages(InitialOrgSetup.java:532)
   at org.openbravo.erpCommon.businessUtility.InitialOrgSetup.createOrganization(InitialOrgSetup.java:183)
   at org.openbravo.erpCommon.ad_forms.InitialOrgSetup.doPost(InitialOrgSetup.java:71)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
   at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
   at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:456)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

The reason seems to be that the connection was committed and closed before the addImages() method is called, thus when that method tries to read the information about the standard images, it fails.
Create an organization using the Initial Organization Setup process, choosing a reference data item different from core, and watch the tomcat log.
--- a/src/org/openbravo/erpCommon/businessUtility/InitialOrgSetup.java
+++ b/src/org/openbravo/erpCommon/businessUtility/InitialOrgSetup.java
@@ -152,10 +152,11 @@
       OBDal.getInstance().flush();
       OBDal.getInstance().commitAndClose();
       org = OBDal.getInstance().get(Organization.class, strOrgId);
+ client = org.getClient();
       if (strcLocationId != null && !strcLocationId.equals(""))
         try {
           InitialSetupUtility.updateOrgLocation(org,
No tags attached.
blocks defect 00160902.50MP29 closed dalsasua An exception is always raised when executing Initial Org Setup 
Issue History
2011-04-12 11:36dalsasuaTypedefect => backport
2011-04-12 11:36dalsasuafix_in_branch => 2.50
2011-04-12 11:56dalsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1814#r1814
2011-04-12 15:02dalsasuaNote Added: 0035853
2011-04-13 09:07dalsasuaProposed Solution updated
2011-04-13 09:12hgbotCheckin
2011-04-13 09:12hgbotNote Added: 0035884
2011-04-13 09:12hgbotStatusscheduled => resolved
2011-04-13 09:12hgbotResolutionopen => fixed
2011-04-13 09:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/332d1690cfa828ee0b91cdd95312d007880ad749 [^]
2011-04-13 11:31dalsasuaStatusresolved => new
2011-04-13 11:31dalsasuaResolutionfixed => open
2011-04-13 11:32dalsasuaStatusnew => scheduled
2011-04-13 11:32dalsasuafix_in_branch2.50 => pi
2011-04-13 11:32dalsasuaStatusscheduled => resolved
2011-04-13 11:32dalsasuaResolutionopen => fixed
2011-04-13 11:44xabiermerinoStatusresolved => new
2011-04-13 11:44xabiermerinoResolutionfixed => open
2011-04-13 11:44xabiermerinoSeveritymajor => minor
2011-04-13 11:44xabiermerinoStatusnew => scheduled
2011-04-13 11:44xabiermerinofix_in_branchpi =>
2011-04-13 11:44xabiermerinoStatusscheduled => resolved
2011-04-13 11:44xabiermerinoResolutionopen => fixed
2011-04-15 14:45jonalegriaesarteNote Added: 0035988
2011-04-15 14:45jonalegriaesarteStatusresolved => closed
2011-04-15 14:46jonalegriaesarteFixed in Version => 2.50MP29

Notes
(0035853)
dalsasua   
2011-04-12 15:02   
No other areas affected. To test, just launch initial organization setup with several configurations: with/out address, with/out modules and accounting, ...
(0035884)
hgbot   
2011-04-13 09:12   
Repository: erp/stable/2.50
Changeset: 332d1690cfa828ee0b91cdd95312d007880ad749
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Tue Apr 12 15:01:41 2011 +0200
URL: http://code.openbravo.com/erp/stable/2.50/rev/332d1690cfa828ee0b91cdd95312d007880ad749 [^]

Fixes issue 16758.
Re-readding the client object

---
M src/org/openbravo/erpCommon/businessUtility/InitialOrgSetup.java
---
(0035988)
jonalegriaesarte   
2011-04-15 14:45   
Verified