Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-2151

Scheduled tasks don't work in 2.x framework

    XMLWordPrintable

Details

    • Low

    Description

      Stack trace

      ERROR: org.openmrs.logic.token.impl.TokenServiceImpl - Error starting class org.openmrs.logic.datasource.ProgramDataSource
      org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
      	at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
      	at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:544)
      	at org.openmrs.logic.token.db.hibernate.HibernateTokenDAO.deleteConfigurationsNotIn(HibernateTokenDAO.java:199)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:616)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
      	at $Proxy139.deleteConfigurationsNotIn(Unknown Source)
      	at org.openmrs.logic.token.impl.TokenServiceImpl.keepOnlyValidConfigurations(TokenServiceImpl.java:387)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:616)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at $Proxy140.keepOnlyValidConfigurations(Unknown Source)
      	at org.openmrs.logic.rule.provider.DataSourceRuleProvider.registerCompleteTokens(DataSourceRuleProvider.java:57)
      	at org.openmrs.logic.rule.provider.RegisterAtStartupDataSourceRuleProvider.afterStartup(RegisterAtStartupDataSourceRuleProvider.java:38)
      	at org.openmrs.logic.token.impl.TokenServiceImpl.startupProviderWithoutDaemon(TokenServiceImpl.java:113)
      	at org.openmrs.logic.token.impl.TokenServiceImpl.startupProviderAsDaemon(TokenServiceImpl.java:100)
      	at org.openmrs.logic.token.impl.TokenServiceImpl.initialize(TokenServiceImpl.java:73)
      	at org.openmrs.logic.token.impl.TokenServiceImpl.onStartup(TokenServiceImpl.java:64)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:616)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at $Proxy140.onStartup(Unknown Source)
      	at org.openmrs.logic.task.InitializeLogicRuleProvidersTask.execute(InitializeLogicRuleProvidersTask.java:46)
      	at org.openmrs.scheduler.tasks.TaskThreadedInitializationWrapper.execute(TaskThreadedInitializationWrapper.java:72)
      	at org.openmrs.api.context.Daemon$2.run(Daemon.java:115)
      

      Gliffy Diagrams

        Attachments

          Activity

            People

              bwolfe Ben Wolfe
              darius Darius Jazayeri
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: