Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030588Openbravo ERPZ. Otherspublic2015-08-17 06:522015-08-25 15:48
yogaskarnik 
caristu 
highmajoralways
closedfixed 
5
3.0PR15Q2.3 
3.0PR15Q4 
AugustoMauch
Core
No
0030588: Log clean up throws an error for the table obmobc_logclient
The log clean up process when scheduled as a background process, fails when the configuration for the table obmobc_logclient is done in the log clean up configuration window logged in as a system admin with the "Date column to Check".

The log file shows the following error.

2015-08-17 10:03:09,505 [DefaultQuartzScheduler_Worker-4] ERROR org.openbravo.service.db.DalBaseProcess - The process org.openbravo.utility.cleanup.log.LogCleanUpProcess has thrown an exception.
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
    at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167)
    at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215)
    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
    at org.openbravo.model.ad.datamodel.Column_$$_javassist_39.getDBColumnName(Column_$$_javassist_39.java)
    at org.openbravo.utility.cleanup.log.CleanEntity.clean(CleanEntity.java:83)
    at org.openbravo.utility.cleanup.log.CleanEntity$Proxy$_$$_WeldClientProxy.clean(CleanEntity$Proxy$_$$_WeldClientProxy.java)
    at org.openbravo.utility.cleanup.log.LogCleanUpProcess.doExecute(LogCleanUpProcess.java:121)
    at org.openbravo.service.db.DalBaseProcess.execute(DalBaseProcess.java:82)
    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)
61788dfd 2015-08-17 10:03:09,506 [DefaultQuartzScheduler_Worker-4] ERROR org.openbravo.scheduling.DefaultJob - Error executing process org.openbravo.scheduling.ProcessBundle@1016e76a
java.lang.Exception: could not initialize proxy - no Session
    at org.openbravo.service.db.DalBaseProcess.execute(DalBaseProcess.java:88)
    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)
1) Log in as a system admin, configure the log clean up .
2) create a new record for the table "obmobc_logclient".
3) set the "Older Than Days" as 30.
4) Enter the "Date column to Check" as "Created".
5) Save the changes, log out , and log in as admin and schedule the background process.
The process will fail.
No tags attached.
Issue History
2015-08-17 06:52yogaskarnikNew Issue
2015-08-17 06:52yogaskarnikAssigned To => Triage Finance
2015-08-17 06:52yogaskarnikModules => Core
2015-08-17 06:52yogaskarnikTriggers an Emergency Pack => No
2015-08-17 13:47VictorVillarResolution time => 1440280800
2015-08-20 11:08aferrazAssigned ToTriage Finance => aferraz
2015-08-20 11:08aferrazStatusnew => scheduled
2015-08-20 12:00AugustoMauchAssigned Toaferraz => platform
2015-08-24 10:56caristuAssigned Toplatform => caristu
2015-08-24 10:56caristuReview Assigned To => AugustoMauch
2015-08-24 10:57caristuIssue Monitored: AugustoMauch
2015-08-24 11:18hgbotCheckin
2015-08-24 11:18hgbotNote Added: 0079632
2015-08-24 11:18hgbotStatusscheduled => resolved
2015-08-24 11:18hgbotResolutionopen => fixed
2015-08-24 11:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a97a18a73bf3c8684ce69f6e5954e5882f6c5c97 [^]
2015-08-25 12:58AugustoMauchNote Added: 0079691
2015-08-25 12:58AugustoMauchStatusresolved => closed
2015-08-25 12:58AugustoMauchFixed in Version => 3.0PR15Q4
2015-08-25 15:48hudsonbotCheckin
2015-08-25 15:48hudsonbotNote Added: 0079723

Notes
(0079632)
hgbot   
2015-08-24 11:18   
Repository: erp/devel/pi
Changeset: a97a18a73bf3c8684ce69f6e5954e5882f6c5c97
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Aug 24 11:17:25 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a97a18a73bf3c8684ce69f6e5954e5882f6c5c97 [^]

fixes issue 30588: LazyInitializationException thrown in log clean up process
In the loop of the clean up process, OBDal.getInstance().commitAndClose() is called, this closes and removes the session, so possible uninitialized proxy objects of the LogCleanUpConfig class could throw a LazyInitializationException. To avoid this problem we now force the reload of the configuration object in every loop iteration.

---
M modules/org.openbravo.utility.cleanup.log/src/org/openbravo/utility/cleanup/log/LogCleanUpProcess.java
---
(0079691)
AugustoMauch   
2015-08-25 12:58   
Code reviewed and verified in pi@90c36b6d356e
(0079723)
hudsonbot   
2015-08-25 15:48   
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/e847ea2dfcc5 [^]
Maturity status: Test