← Back to team overview

dhis2-devs team mailing list archive

Re: Hibernate Exception in scheduled task

 

Knut is right. This is a known issue. You will not experience any issues
except for ugly logs once every 24 hours. It will get fixed and backported
soon.
On 2 Feb 2016 9:49 p.m., "Lorill Crees" <lcrees@xxxxxxxxxx> wrote:

> Thanks Knut.
>
> On Tue, Feb 2, 2016 at 12:46 PM, Knut Staring <knutst@xxxxxxxxx> wrote:
>
>> Hi Lorill,
>>
>> This was recently replied to by Halvdan:
>>
>> https://lists.launchpad.net/dhis2-users/msg09122.html
>>
>> On Tue, Feb 2, 2016 at 8:18 PM, Lorill Crees <lcrees@xxxxxxxxxx> wrote:
>>
>>> Hi,
>>>
>>> We have 9 separate DHIS 2 instances that we are managing and I notice
>>> that we are getting a recurring error logged in the tomcat logs on all
>>> instances related to scheduled tasks (stack trace below).
>>>
>>> We are using 2.22 revision 21782.
>>>
>>> I'm not sure what functionality this is affecting. Should we be
>>> concerned?
>>>
>>> Thanks,
>>>
>>> Lorill
>>>
>>> * ERROR 2016-02-02 02:00:00,005 Unexpected error occurred in scheduled
>>> task. (TaskUtils.java [taskScheduler-3])
>>>
>>> org.hibernate.HibernateException: Could not obtain
>>> transaction-synchronized Session for current thread
>>>
>>> at
>>> org.springframework.orm.hibernate4.SpringSessionContext.currentSession(SpringSessionContext.java:134)
>>>
>>> at
>>> org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:993)
>>>
>>> at
>>> org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:205)
>>>
>>> at
>>> org.hisp.dhis.hibernate.HibernateGenericStore.getSharingCriteria(HibernateGenericStore.java:200)
>>>
>>> at
>>> org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore.getAllLeCreated(HibernateIdentifiableObjectStore.java:404)
>>>
>>> at
>>> org.hisp.dhis.fileresource.DefaultFileResourceService.getOrphanedFileResources(DefaultFileResourceService.java:138)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:483)
>>>
>>> at
>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>>
>>> at
>>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
>>>
>>> at com.sun.proxy.$Proxy103.getOrphanedFileResources(Unknown Source)
>>>
>>> at
>>> org.hisp.dhis.fileresource.FileResourceCleanUpTask.run(FileResourceCleanUpTask.java:58)
>>>
>>> at
>>> org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
>>>
>>> at
>>> org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
>>>
>>> at
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>>>
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>
>>> at
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>>>
>>> at
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>>>
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>>
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>>
>>> at java.lang.Thread.run(Thread.java:745)
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

References