org.hibernate.LazyInitializationException

could not initialize proxy - no Session

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web224

  • via Unknown by Dan McCallum,
  • via Unknown by Dan McCallum,
  • Stack trace

    • org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:149)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:195)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.internal.ForeignKeys$Nullifier.isNullifiable(ForeignKeys.java:142)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.internal.ForeignKeys$Nullifier.nullifyTransientReferences(ForeignKeys.java:94)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.internal.ForeignKeys$Nullifier.nullifyTransientReferences(ForeignKeys.java:72)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:294)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:195)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:138)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:204)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:189)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:114)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:615)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:608)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.spi.CascadingAction$5.cascade(CascadingAction.java:258)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:380)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:323)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:208)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:165)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:437)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:266)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:195)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:138)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:204)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:189)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:114)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:615)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:608)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:604)[hibernate-core-4.0.1.Final.jar:4.0.1.Final] at org.jasig.ssp.dao.AbstractAuditableCrudDao.save(AbstractAuditableCrudDao.java:92)[AbstractAuditableCrudDao.class:na] at org.jasig.ssp.service.impl.PersonServiceImpl.save(PersonServiceImpl.java:455)[PersonServiceImpl.class:na] at sun.reflect.GeneratedMethodAccessor361.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_37] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_37] 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 $Proxy261.save(Unknown Source)[na:na] at org.jasig.ssp.service.external.impl.ExternalPersonServiceImpl.updatePersonFromExternalPerson(ExternalPersonServiceImpl.java:393)[ExternalPersonServiceImpl.class:na] at sun.reflect.GeneratedMethodAccessor360.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_37] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_37] 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 $Proxy266.updatePersonFromExternalPerson(Unknown Source)[na:na] at org.jasig.ssp.service.impl.PersonServiceImpl$5.call(PersonServiceImpl.java:704)[PersonServiceImpl$5.class:na] at org.jasig.ssp.util.transaction.WithTransactionImpl.doWork(WithTransactionImpl.java:61)[WithTransactionImpl.class:na] at org.jasig.ssp.util.transaction.WithTransactionImpl.doWorkUnchecked(WithTransactionImpl.java:66)[WithTransactionImpl.class:na] at org.jasig.ssp.util.transaction.WithTransactionImpl.withNewTransactionAndUncheckedExceptions(WithTransactionImpl.java:39)[WithTransactionImpl.class:na] at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_37] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_37] 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 $Proxy267.withNewTransactionAndUncheckedExceptions(Unknown Source)[na:na] at org.jasig.ssp.service.impl.PersonServiceImpl.withCoachSyncTransaction(PersonServiceImpl.java:764)[PersonServiceImpl.class:na] at org.jasig.ssp.service.impl.PersonServiceImpl.syncCoaches(PersonServiceImpl.java:669)[PersonServiceImpl.class:na] at sun.reflect.GeneratedMethodAccessor374.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_37] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_37] 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 $Proxy261.syncCoaches(Unknown Source)[na:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl$8.run(ScheduledTaskWrapperServiceImpl.java:626)[ScheduledTaskWrapperServiceImpl$8.class:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl$5.run(ScheduledTaskWrapperServiceImpl.java:548)[ScheduledTaskWrapperServiceImpl$5.class:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl$4.run(ScheduledTaskWrapperServiceImpl.java:467)[ScheduledTaskWrapperServiceImpl$4.class:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl$6.run(ScheduledTaskWrapperServiceImpl.java:568)[ScheduledTaskWrapperServiceImpl$6.class:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.execWithTaskContext(ScheduledTaskWrapperServiceImpl.java:599)[ScheduledTaskWrapperServiceImpl.class:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.syncCoaches(ScheduledTaskWrapperServiceImpl.java:618)[ScheduledTaskWrapperServiceImpl.class:na] at sun.reflect.GeneratedMethodAccessor377.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_37] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_37] 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:439)[na:1.6.0_37] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[na:1.6.0_37] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[na:1.6.0_37] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[na:1.6.0_37] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[na:1.6.0_37] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[na:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[na:1.6.0_37] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[na:1.6.0_37] at java.lang.Thread.run(Thread.java:680)[na:1.6.0_37]

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    derproggerderprogger
    3 times, last one
    linxiaolonglinxiaolong
    2 times, last one
    SteVio1989SteVio1989
    124 times, last one
    tomthomastomthomas
    Once,
    Unknown visitor
    Unknown visitorOnce,
    17 more bugmates