org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'transactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

Apereo Issues | Dan McCallum | 4 years ago
  1. 0

    Wait for the background jobs to start running by looking for their logging output then try to shutdown tomcat gracefully. E.g. with the init.d script in CI. Tomcat will shut down cleanly, but if you watch 'select * from databasechangeloglock' before and after the shutdown command you'll see that at some point during shutdown the lock is aquired and not released. Interestingly, this doesn't happen *all* the time. I can get it to occur nearly every time, but on the one time I didn't get it to occur, I think I was a bit quicker on the shutdown and I got this trace: {noformat} ==> ssp.log <== DEV: 19:28:23.423 [sspScheduler-3] ERROR o.j.s.s.e.i.ExternalPersonServiceImpl - Failed to sync Person table with ExternalPerson org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'transactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:212) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAspectSupport.java:249) ~[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at sun.proxy.$Proxy75.currentFallingBackToAdmin(Unknown Source) ~[na:na] at org.jasig.ssp.dao.AuditableEntityInterceptor.currentUser(AuditableEntityInterceptor.java:173) ~[AuditableEntityInterceptor.class:na] at org.jasig.ssp.dao.AuditableEntityInterceptor.addAuditingProps(AuditableEntityInterceptor.java:128) ~[AuditableEntityInterceptor.class:na] at org.jasig.ssp.dao.AuditableEntityInterceptor.onFlushDirty(AuditableEntityInterceptor.java:72) ~[AuditableEntityInterceptor.class:na] at org.hibernate.event.internal.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:338) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:315) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:266) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:149) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:225) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:55) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1053) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1476) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:396) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.jasig.ssp.dao.external.RegistrationStatusByTermDao.getForTerm(RegistrationStatusByTermDao.java:52) ~[RegistrationStatusByTermDao.class:na] at org.jasig.ssp.service.external.impl.RegistrationStatusByTermServiceImpl.getCurrentAndFutureTerms(RegistrationStatusByTermServiceImpl.java:123) ~[RegistrationStatusByTermServiceImpl.class:na] at org.jasig.ssp.service.external.impl.RegistrationStatusByTermServiceImpl.applyCurrentAndFutureRegistrationStatuses(RegistrationStatusByTermServiceImpl.java:111) ~[RegistrationStatusByTermServiceImpl.class:na] at sun.reflect.GeneratedMethodAccessor153.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_24] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at sun.proxy.$Proxy67.applyCurrentAndFutureRegistrationStatuses(Unknown Source) ~[na:na] at org.jasig.ssp.service.impl.PersonServiceImpl.additionalAttribsForStudent(PersonServiceImpl.java:725) ~[PersonServiceImpl.class:na] at org.jasig.ssp.service.impl.PersonServiceImpl.save(PersonServiceImpl.java:416) ~[PersonServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_24] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at sun.proxy.$Proxy68.save(Unknown Source) ~[na:na] at org.jasig.ssp.service.external.impl.ExternalPersonServiceImpl.updatePersonFromExternalPerson(ExternalPersonServiceImpl.java:403) ~[ExternalPersonServiceImpl.class:na] at org.jasig.ssp.service.external.impl.ExternalPersonServiceImpl.syncWithPerson(ExternalPersonServiceImpl.java:155) ~[ExternalPersonServiceImpl.class:na] at org.jasig.ssp.service.external.impl.ExternalPersonServiceImpl.syncWithPerson(ExternalPersonServiceImpl.java:110) ~[ExternalPersonServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_24] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at sun.proxy.$Proxy71.syncWithPerson(Unknown Source) [na:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.syncExternalPersons(ScheduledTaskWrapperServiceImpl.java:100) [ScheduledTaskWrapperServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_24] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) [spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) [spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.6.0_24] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) [na:1.6.0_24] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) [na:1.6.0_24] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) [na:1.6.0_24] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) [na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.6.0_24] at java.lang.Thread.run(Thread.java:679) [na:1.6.0_24] DEV: 19:28:23.431 [sspScheduler-3] ERROR o.s.s.s.TaskUtils$LoggingErrorHandler - Unexpected error occurred in scheduled task. org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'transactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:212) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAspectSupport.java:249) ~[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100) ~[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at sun.proxy.$Proxy75.afterRequest(Unknown Source) ~[na:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.syncExternalPersons(ScheduledTaskWrapperServiceImpl.java:102) ~[ScheduledTaskWrapperServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_24] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) ~[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) ~[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.6.0_24] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) [na:1.6.0_24] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) [na:1.6.0_24] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) [na:1.6.0_24] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) [na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.6.0_24] at java.lang.Thread.run(Thread.java:679) [na:1.6.0_24] DEV: 19:28:23.446 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'sspScheduler' {noformat} So my guess is that there's something wrong with the way our beans are defined vis-a-via background jobs that causes the Liquibase bean to re-initialize for some reason during either some portion of job execution or the shutdown process for the ExecutorService itself.

    Apereo Issues | 4 years ago | Dan McCallum
    org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'transactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
  2. 0

    Wait for the background jobs to start running by looking for their logging output then try to shutdown tomcat gracefully. E.g. with the init.d script in CI. Tomcat will shut down cleanly, but if you watch 'select * from databasechangeloglock' before and after the shutdown command you'll see that at some point during shutdown the lock is aquired and not released. Interestingly, this doesn't happen *all* the time. I can get it to occur nearly every time, but on the one time I didn't get it to occur, I think I was a bit quicker on the shutdown and I got this trace: {noformat} ==> ssp.log <== DEV: 19:28:23.423 [sspScheduler-3] ERROR o.j.s.s.e.i.ExternalPersonServiceImpl - Failed to sync Person table with ExternalPerson org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'transactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:212) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAspectSupport.java:249) ~[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at sun.proxy.$Proxy75.currentFallingBackToAdmin(Unknown Source) ~[na:na] at org.jasig.ssp.dao.AuditableEntityInterceptor.currentUser(AuditableEntityInterceptor.java:173) ~[AuditableEntityInterceptor.class:na] at org.jasig.ssp.dao.AuditableEntityInterceptor.addAuditingProps(AuditableEntityInterceptor.java:128) ~[AuditableEntityInterceptor.class:na] at org.jasig.ssp.dao.AuditableEntityInterceptor.onFlushDirty(AuditableEntityInterceptor.java:72) ~[AuditableEntityInterceptor.class:na] at org.hibernate.event.internal.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:338) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:315) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:266) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:149) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:225) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:55) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1053) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1476) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:396) ~[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.jasig.ssp.dao.external.RegistrationStatusByTermDao.getForTerm(RegistrationStatusByTermDao.java:52) ~[RegistrationStatusByTermDao.class:na] at org.jasig.ssp.service.external.impl.RegistrationStatusByTermServiceImpl.getCurrentAndFutureTerms(RegistrationStatusByTermServiceImpl.java:123) ~[RegistrationStatusByTermServiceImpl.class:na] at org.jasig.ssp.service.external.impl.RegistrationStatusByTermServiceImpl.applyCurrentAndFutureRegistrationStatuses(RegistrationStatusByTermServiceImpl.java:111) ~[RegistrationStatusByTermServiceImpl.class:na] at sun.reflect.GeneratedMethodAccessor153.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_24] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at sun.proxy.$Proxy67.applyCurrentAndFutureRegistrationStatuses(Unknown Source) ~[na:na] at org.jasig.ssp.service.impl.PersonServiceImpl.additionalAttribsForStudent(PersonServiceImpl.java:725) ~[PersonServiceImpl.class:na] at org.jasig.ssp.service.impl.PersonServiceImpl.save(PersonServiceImpl.java:416) ~[PersonServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_24] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at sun.proxy.$Proxy68.save(Unknown Source) ~[na:na] at org.jasig.ssp.service.external.impl.ExternalPersonServiceImpl.updatePersonFromExternalPerson(ExternalPersonServiceImpl.java:403) ~[ExternalPersonServiceImpl.class:na] at org.jasig.ssp.service.external.impl.ExternalPersonServiceImpl.syncWithPerson(ExternalPersonServiceImpl.java:155) ~[ExternalPersonServiceImpl.class:na] at org.jasig.ssp.service.external.impl.ExternalPersonServiceImpl.syncWithPerson(ExternalPersonServiceImpl.java:110) ~[ExternalPersonServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_24] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at sun.proxy.$Proxy71.syncWithPerson(Unknown Source) [na:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.syncExternalPersons(ScheduledTaskWrapperServiceImpl.java:100) [ScheduledTaskWrapperServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_24] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) [spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) [spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.6.0_24] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) [na:1.6.0_24] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) [na:1.6.0_24] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) [na:1.6.0_24] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) [na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.6.0_24] at java.lang.Thread.run(Thread.java:679) [na:1.6.0_24] DEV: 19:28:23.431 [sspScheduler-3] ERROR o.s.s.s.TaskUtils$LoggingErrorHandler - Unexpected error occurred in scheduled task. org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'transactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:212) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAspectSupport.java:249) ~[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100) ~[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at sun.proxy.$Proxy75.afterRequest(Unknown Source) ~[na:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.syncExternalPersons(ScheduledTaskWrapperServiceImpl.java:102) ~[ScheduledTaskWrapperServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) ~[na:1.6.0_24] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) ~[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) ~[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.6.0_24] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) [na:1.6.0_24] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) [na:1.6.0_24] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) [na:1.6.0_24] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) [na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.6.0_24] at java.lang.Thread.run(Thread.java:679) [na:1.6.0_24] DEV: 19:28:23.446 [main] INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'sspScheduler' {noformat} So my guess is that there's something wrong with the way our beans are defined vis-a-via background jobs that causes the Liquibase bean to re-initialize for some reason during either some portion of job execution or the shutdown process for the ExecutorService itself.

    Apereo Issues | 4 years ago | Dan McCallum
    org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'transactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
  3. 0

    Spring 3 and hibernate 4.X facing a transaction Manager Exception in destroy-method

    Stack Overflow | 4 years ago | Raveesh Sharma
    org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'transactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [jbpm-issues] [JBoss JIRA] Updated: (JBPM-2710) jbpm-4.3 Spring integration failled

    jboss.org | 1 year ago
    org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'transactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
  6. 0

    Spring Integration: Getting Exception on refreshing application context 2nd time

    Stack Overflow | 2 years ago | Sumit Jain
    org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'org.springframework.integration.config.IdGeneratorConfigurer#0': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

  1. mauritius 1 times, last 1 month ago
  2. kjhdofjosvs 1 times, last 3 weeks ago
  3. Luka 8 times, last 2 months ago
  4. Luka 1 times, last 2 months ago
  5. abrazeneb 1 times, last 3 months ago
2 more registered users
8 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.springframework.beans.factory.BeanCreationNotAllowedException

    Error creating bean with name 'transactionManager': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton()
  2. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:212)[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    2. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    3. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    3 frames
  3. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAspectSupport.java:249)[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    2. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100)[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    2 frames
  4. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    2 frames
  5. sun.proxy
    $Proxy75.afterRequest
    1. sun.proxy.$Proxy75.afterRequest(Unknown Source)[na:na]
    1 frame
  6. org.jasig.ssp
    ScheduledTaskWrapperServiceImpl.syncExternalPersons
    1. org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.syncExternalPersons(ScheduledTaskWrapperServiceImpl.java:102)[ScheduledTaskWrapperServiceImpl.class:na]
    1 frame
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_24]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[na:1.6.0_24]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.6.0_24]
    4. java.lang.reflect.Method.invoke(Method.java:616)[na:1.6.0_24]
    4 frames
  8. Spring Context
    DelegatingErrorHandlingRunnable.run
    1. org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    2. org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    2 frames
  9. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[na:1.6.0_24]
    2. java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)[na:1.6.0_24]
    3. java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)[na:1.6.0_24]
    4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)[na:1.6.0_24]
    5. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)[na:1.6.0_24]
    6. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)[na:1.6.0_24]
    7. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.6.0_24]
    8. java.lang.Thread.run(Thread.java:679)[na:1.6.0_24]
    8 frames