Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016090Openbravo ERPA. Platformpublic2011-03-01 12:222011-06-13 10:11
marvintm 
dalsasua 
highminorhave not tried
closedfixed 
5
2.50MP27 
2.50MP293.0MP0 
Core
No
0016090: 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.
depends on backport 00167582.50MP29 closed dalsasua An exception is always raised when executing Initial Org Setup 
Issue History
2011-03-01 12:22marvintmNew Issue
2011-03-01 12:22marvintmAssigned To => dalsasua
2011-03-01 12:22marvintmModules => Core
2011-03-01 12:25dalsasuaProposed Solution updated
2011-03-10 16:56xabiermerinoPrioritynormal => high
2011-03-10 16:56xabiermerinoversion => 2.50MP27
2011-03-10 16:56xabiermerinoTarget Version => 2.50MP29
2011-03-14 15:30dvpsonNote Added: 0034807
2011-04-12 11:36dalsasuaStatusnew => scheduled
2011-04-12 11:36dalsasuafix_in_branch => pi
2011-04-12 11:55dalsasuafix_in_branchpi =>
2011-04-12 11:55dalsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1812#r1812
2011-04-12 15:02dalsasuaNote Added: 0035854
2011-04-13 09:09dalsasuaProposed Solution updated
2011-04-13 11:45xabiermerinoSeveritymajor => minor
2011-04-21 16:09hgbotCheckin
2011-04-21 16:09hgbotNote Added: 0036062
2011-04-21 16:09hgbotStatusscheduled => resolved
2011-04-21 16:09hgbotResolutionopen => fixed
2011-04-21 16:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3f0c0c2ce65406f2c1fe3230d11db33a94a4a371 [^]
2011-05-12 13:26hudsonbotCheckin
2011-05-12 13:26hudsonbotNote Added: 0036760
2011-06-13 10:11jonalegriaesarteNote Added: 0038281
2011-06-13 10:11jonalegriaesarteStatusresolved => closed
2011-06-13 10:11jonalegriaesarteFixed in Version => 3.0MP0

Notes
(0034807)
dvpson   
2011-03-14 15:30   
The same issue appears in 3.0 RC4, get the message
could not initialise proxy - no session
when trying to create a new organisation.
(0035854)
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, ...
(0036062)
hgbot   
2011-04-21 16:09   
Repository: erp/devel/pi
Changeset: 3f0c0c2ce65406f2c1fe3230d11db33a94a4a371
Author: David Alsasua <david.alsasua <at> openbravo.com>
Date: Tue Apr 12 13:54:45 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3f0c0c2ce65406f2c1fe3230d11db33a94a4a371 [^]

Fixes issue 16090.
Re-readding the client object

---
M src/org/openbravo/erpCommon/businessUtility/InitialOrgSetup.java
---
(0036760)
hudsonbot   
2011-05-12 13:26   
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/c40e579fcd38 [^]

Maturity status: Test
(0038281)
jonalegriaesarte   
2011-06-13 10:11   
Verified