net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:47) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$6c6ddc66.getKey() at com.atlassian.confluence.core.SpaceContentEntityObject.hashCode(SpaceContentEntityObject.java:36)

Atlassian JIRA | Charles Miller | 1 decade ago
  1. 0

    This is occasionally killing the DR5 on confluence.atlassian.com: [ERROR] Wed Nov 24 07:44:12 CST 2004 [net.sf.hibernate.proxy.LazyInitializer] Exception initializing proxy Throwable: net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:47) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$6c6ddc66.getKey() at com.atlassian.confluence.core.SpaceContentEntityObject.hashCode(SpaceContentEntityObject.java:36) at net.sf.hibernate.engine.TypedValue.hashCode(TypedValue.java:45) at java.util.HashMap$Entry.hashCode(HashMap.java:707) at java.util.AbstractMap.hashCode(AbstractMap.java:556) at net.sf.hibernate.cache.QueryKey.hashCode(QueryKey.java:63) at java.util.HashMap.hash(HashMap.java:261) at java.util.HashMap.removeEntryForKey(HashMap.java:538) at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:396) at java.util.HashMap.put(HashMap.java:392) at net.sf.ehcache.store.MemoryStore.put(MemoryStore.java:177) at net.sf.ehcache.Cache.put(Cache.java:318) at net.sf.ehcache.hibernate.Plugin.put(Plugin.java:146) at net.sf.hibernate.cache.StandardQueryCache.put(StandardQueryCache.java:59) at net.sf.hibernate.loader.Loader.list(Loader.java:1019) [ERROR] Wed Nov 24 07:44:12 CST 2004 [com.atlassian.confluence.util.XWorkTransactionInterceptor] Invoking rollback for transaction on action '/pages/viewpage.action (ViewPageAction.execute())' due to throwable: net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.confluence.spaces.Space#1] Throwable: net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.confluence.spaces.Space#1] at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$6c6ddc66.getKey() at com.atlassian.confluence.core.SpaceContentEntityObject.hashCode(SpaceContentEntityObject.java:36) at net.sf.hibernate.engine.TypedValue.hashCode(TypedValue.java:45) at java.util.HashMap$Entry.hashCode(HashMap.java:707) at java.util.AbstractMap.hashCode(AbstractMap.java:556) at net.sf.hibernate.cache.QueryKey.hashCode(QueryKey.java:63) at java.util.HashMap.hash(HashMap.java:261) at java.util.HashMap.removeEntryForKey(HashMap.java:538) at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:396) at java.util.HashMap.put(HashMap.java:392) at net.sf.ehcache.store.MemoryStore.put(MemoryStore.java:177) at net.sf.ehcache.Cache.put(Cache.java:318) at net.sf.ehcache.hibernate.Plugin.put(Plugin.java:146) at net.sf.hibernate.cache.StandardQueryCache.put(StandardQueryCache.java:59) at net.sf.hibernate.loader.Loader.list(Loader.java:1019) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854) [ERROR] Wed Nov 24 07:44:12 CST 2004 [com.opensymphony.webwork.dispatcher.ServletDispatcher] Could not execute action Throwable: net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.confluence.spaces.Space#1] at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$6c6ddc66.getKey() at com.atlassian.confluence.core.SpaceContentEntityObject.hashCode(SpaceContentEntityObject.java:36) at net.sf.hibernate.engine.TypedValue.hashCode(TypedValue.java:45) at java.util.HashMap$Entry.hashCode(HashMap.java:707) at java.util.AbstractMap.hashCode(AbstractMap.java:556) at net.sf.hibernate.cache.QueryKey.hashCode(QueryKey.java:63) at java.util.HashMap.hash(HashMap.java:261) at java.util.HashMap.removeEntryForKey(HashMap.java:538) at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:396) at java.util.HashMap.put(HashMap.java:392) at net.sf.ehcache.store.MemoryStore.put(MemoryStore.java:177) at net.sf.ehcache.Cache.put(Cache.java:318) at net.sf.ehcache.hibernate.Plugin.put(Plugin.java:146) at net.sf.hibernate.cache.StandardQueryCache.put(StandardQueryCache.java:59) at net.sf.hibernate.loader.Loader.list(Loader.java:1019) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)

    Atlassian JIRA | 1 decade ago | Charles Miller
    net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:47) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$6c6ddc66.getKey() at com.atlassian.confluence.core.SpaceContentEntityObject.hashCode(SpaceContentEntityObject.java:36)
  2. 0

    This is occasionally killing the DR5 on confluence.atlassian.com: [ERROR] Wed Nov 24 07:44:12 CST 2004 [net.sf.hibernate.proxy.LazyInitializer] Exception initializing proxy Throwable: net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:47) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$6c6ddc66.getKey() at com.atlassian.confluence.core.SpaceContentEntityObject.hashCode(SpaceContentEntityObject.java:36) at net.sf.hibernate.engine.TypedValue.hashCode(TypedValue.java:45) at java.util.HashMap$Entry.hashCode(HashMap.java:707) at java.util.AbstractMap.hashCode(AbstractMap.java:556) at net.sf.hibernate.cache.QueryKey.hashCode(QueryKey.java:63) at java.util.HashMap.hash(HashMap.java:261) at java.util.HashMap.removeEntryForKey(HashMap.java:538) at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:396) at java.util.HashMap.put(HashMap.java:392) at net.sf.ehcache.store.MemoryStore.put(MemoryStore.java:177) at net.sf.ehcache.Cache.put(Cache.java:318) at net.sf.ehcache.hibernate.Plugin.put(Plugin.java:146) at net.sf.hibernate.cache.StandardQueryCache.put(StandardQueryCache.java:59) at net.sf.hibernate.loader.Loader.list(Loader.java:1019) [ERROR] Wed Nov 24 07:44:12 CST 2004 [com.atlassian.confluence.util.XWorkTransactionInterceptor] Invoking rollback for transaction on action '/pages/viewpage.action (ViewPageAction.execute())' due to throwable: net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.confluence.spaces.Space#1] Throwable: net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.confluence.spaces.Space#1] at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$6c6ddc66.getKey() at com.atlassian.confluence.core.SpaceContentEntityObject.hashCode(SpaceContentEntityObject.java:36) at net.sf.hibernate.engine.TypedValue.hashCode(TypedValue.java:45) at java.util.HashMap$Entry.hashCode(HashMap.java:707) at java.util.AbstractMap.hashCode(AbstractMap.java:556) at net.sf.hibernate.cache.QueryKey.hashCode(QueryKey.java:63) at java.util.HashMap.hash(HashMap.java:261) at java.util.HashMap.removeEntryForKey(HashMap.java:538) at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:396) at java.util.HashMap.put(HashMap.java:392) at net.sf.ehcache.store.MemoryStore.put(MemoryStore.java:177) at net.sf.ehcache.Cache.put(Cache.java:318) at net.sf.ehcache.hibernate.Plugin.put(Plugin.java:146) at net.sf.hibernate.cache.StandardQueryCache.put(StandardQueryCache.java:59) at net.sf.hibernate.loader.Loader.list(Loader.java:1019) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854) [ERROR] Wed Nov 24 07:44:12 CST 2004 [com.opensymphony.webwork.dispatcher.ServletDispatcher] Could not execute action Throwable: net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.confluence.spaces.Space#1] at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$6c6ddc66.getKey() at com.atlassian.confluence.core.SpaceContentEntityObject.hashCode(SpaceContentEntityObject.java:36) at net.sf.hibernate.engine.TypedValue.hashCode(TypedValue.java:45) at java.util.HashMap$Entry.hashCode(HashMap.java:707) at java.util.AbstractMap.hashCode(AbstractMap.java:556) at net.sf.hibernate.cache.QueryKey.hashCode(QueryKey.java:63) at java.util.HashMap.hash(HashMap.java:261) at java.util.HashMap.removeEntryForKey(HashMap.java:538) at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:396) at java.util.HashMap.put(HashMap.java:392) at net.sf.ehcache.store.MemoryStore.put(MemoryStore.java:177) at net.sf.ehcache.Cache.put(Cache.java:318) at net.sf.ehcache.hibernate.Plugin.put(Plugin.java:146) at net.sf.hibernate.cache.StandardQueryCache.put(StandardQueryCache.java:59) at net.sf.hibernate.loader.Loader.list(Loader.java:1019) at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)

    Atlassian JIRA | 1 decade ago | Charles Miller
    net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:47) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$6c6ddc66.getKey() at com.atlassian.confluence.core.SpaceContentEntityObject.hashCode(SpaceContentEntityObject.java:36)
  3. 0

    Mapping documents: <hibernate-mapping package="com.lmichasz.test.hibernate"> <class name="AImpl" proxy="A" table="A"> <id name="ID" column="ID" type="long"> <generator class="identity"/> </id> <property name="x" column="X" length="100" type="string" /> <many-to-one name="b" class="BImpl" column="B_ID" foreign-key="A_FK1"/> <bag name="bs" inverse="true" lazy="true" > <key column="A_ID"/> <one-to-many class="BImpl"/> </bag> </class> </hibernate-mapping> <hibernate-mapping package="com.lmichasz.test.hibernate"> <class name="BImpl" proxy="B" table="B"> <id name="ID" column="ID" type="long"> <generator class="identity"/> </id> <property name="x" column="X" length="100" type="string" /> <many-to-one name="a" class="AImpl" column="A_ID" foreign-key="B_FK1"/> </class> </hibernate-mapping> Code between sessionFactory.openSession() and session.close(): Configuration c = new Configuration(); c.configure(); SessionFactory sf = c.buildSessionFactory(); Session s = sf.openSession(); Transaction t = s.beginTransaction(); A a = (A)s.get(AImpl.class,new Long(1)); Hibernate.initialize(a.getBs()); t.commit(); s.close(); B b = (B)a.getBs().get(0); b.getX(); //<- Here exception is thrown sf.close(); Full stack trace of any exception that occurs: net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.lmichasz.test.hibernate.BImpl#1] at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at net.sf.hibernate.proxy.HibernateProxy$$EnhancerByCGLIB$$4daf392.getX(<generated>) at com.lmichasz.test.hibernate.test.Test.main(Test.java:42) Caused by: net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:47) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) ... 4 more The generated SQL (show_sql=true): Hibernate: select aimpl0_.ID as ID0_, aimpl0_.X as X0_, aimpl0_.B_ID as B_ID0_ from A aimpl0_ where aimpl0_.ID=? Hibernate: select bs0_.A_ID as A_ID__, bs0_.ID as ID__, bs0_.ID as ID0_, bs0_.X as X0_, bs0_.A_ID as A_ID0_ from B bs0_ where bs0_.A_ID=? Debug level Hibernate log excerpt: 22:36:48,389 DEBUG SessionImpl:3260 - initializing collection [com.lmichasz.test.hibernate.AImpl.bs#1] 22:36:48,399 DEBUG SessionImpl:3261 - checking second-level cache 22:36:48,399 DEBUG SessionImpl:3267 - collection not cached 22:36:48,399 DEBUG BatcherImpl:200 - about to open: 0 open PreparedStatements, 0 open ResultSets 22:36:48,399 DEBUG SQL:226 - select bs0_.A_ID as A_ID__, bs0_.ID as ID__, bs0_.ID as ID0_, bs0_.X as X0_, bs0_.A_ID as A_ID0_ from B bs0_ where bs0_.A_ID=? Hibernate: select bs0_.A_ID as A_ID__, bs0_.ID as ID__, bs0_.ID as ID0_, bs0_.X as X0_, bs0_.A_ID as A_ID0_ from B bs0_ where bs0_.A_ID=? 22:36:48,409 DEBUG BatcherImpl:249 - preparing statement 22:36:48,439 DEBUG Loader:402 - result set contains (possibly empty) collection: [com.lmichasz.test.hibernate.AImpl.bs#1] 22:36:48,449 DEBUG SessionImpl:3018 - uninitialized collection: initializing 22:36:48,449 DEBUG Loader:277 - processing result set 22:36:48,449 DEBUG Loader:480 - result row: 1 22:36:48,459 DEBUG Loader:611 - Initializing object from ResultSet: 1 22:36:48,459 DEBUG Loader:680 - Hydrating entity: com.lmichasz.test.hibernate.BImpl#1 22:36:48,459 DEBUG Loader:367 - found row of collection: [com.lmichasz.test.hibernate.AImpl.bs#1] 22:36:48,469 DEBUG SessionImpl:3041 - reading row 22:36:48,469 DEBUG SessionImpl:1986 - loading [com.lmichasz.test.hibernate.BImpl#1] 22:36:48,479 DEBUG SessionImpl:2083 - attempting to resolve [com.lmichasz.test.hibernate.BImpl#1] 22:36:48,479 DEBUG SessionImpl:2099 - resolved object in session cache [com.lmichasz.test.hibernate.BImpl#1] 22:36:48,479 DEBUG Loader:294 - done processing result set (1 rows) 22:36:48,479 DEBUG BatcherImpl:207 - done closing: 0 open PreparedStatements, 0 open ResultSets 22:36:48,499 DEBUG BatcherImpl:269 - closing statement 22:36:48,499 DEBUG Loader:314 - total objects hydrated: 1 22:36:48,509 DEBUG SessionImpl:2202 - resolving associations for [com.lmichasz.test.hibernate.BImpl#1] 22:36:48,509 DEBUG SessionImpl:1986 - loading [com.lmichasz.test.hibernate.AImpl#1] 22:36:48,509 DEBUG SessionImpl:2083 - attempting to resolve [com.lmichasz.test.hibernate.AImpl#1] 22:36:48,509 DEBUG SessionImpl:2099 - resolved object in session cache [com.lmichasz.test.hibernate.AImpl#1] 22:36:48,509 DEBUG SessionImpl:2226 - done materializing entity [com.lmichasz.test.hibernate.BImpl#1] 22:36:48,519 DEBUG SessionImpl:3077 - 1 collections were found in result set 22:36:48,519 DEBUG SessionImpl:3095 - collection fully initialized: [com.lmichasz.test.hibernate.AImpl.bs#1] 22:36:48,529 DEBUG SessionImpl:3098 - 1 collections initialized 22:36:48,529 DEBUG SessionImpl:3116 - initializing non-lazy collections 22:36:48,529 DEBUG SessionImpl:3269 - collection initialized 22:36:48,529 DEBUG JDBCTransaction:59 - commit 22:36:48,539 DEBUG SessionImpl:2246 - flushing session 22:36:48,539 DEBUG SessionImpl:2439 - Flushing entities and processing referenced collections 22:36:48,589 DEBUG SessionImpl:2884 - Collection found: [com.lmichasz.test.hibernate.AImpl.bs#1], was: [com.lmichasz.test.hibernate.AImpl.bs#1] 22:36:48,589 DEBUG SessionImpl:2780 - Processing unreferenced collections 22:36:48,589 DEBUG SessionImpl:2794 - Scheduling collection removes/(re)creates/updates 22:36:48,589 DEBUG SessionImpl:2270 - Flushed: 0 insertions, 0 updates, 0 deletions to 2 objects 22:36:48,599 DEBUG SessionImpl:2275 - Flushed: 0 (re)creations, 0 updates, 0 removals to 1 collections 22:36:48,599 DEBUG Printer:75 - listing entities: 22:36:48,599 DEBUG Printer:82 - com.lmichasz.test.hibernate.BImpl{a=AImpl#1, x=null, ID=1} 22:36:48,609 DEBUG Printer:82 - com.lmichasz.test.hibernate.AImpl{b=BImpl#1, bs=[BImpl#1], x=null, ID=1} 22:36:48,609 DEBUG SessionImpl:2359 - executing flush 22:36:48,619 DEBUG SessionImpl:2824 - post flush 22:36:48,619 DEBUG SessionImpl:585 - transaction completion 22:36:48,629 DEBUG SessionImpl:573 - closing session 22:36:48,629 DEBUG SessionImpl:3336 - disconnecting session 22:36:48,639 DEBUG DriverManagerConnectionProvider:120 - returning connection to pool, pool size: 1 22:36:48,639 DEBUG SessionImpl:585 - transaction completion 22:36:48,649 ERROR LazyInitializer:63 - Exception initializing proxy

    Hibernate JIRA | 1 decade ago | Lukasz Michonski
    net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.lmichasz.test.hibernate.BImpl#1]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    2010-09-22 17:32:41,805 INFO [QuartzScheduler_Worker-4] [DeletionServiceImpl] Deleting 1 job(s) that have been marked for deletion 2010-09-22 17:32:42,196 ERROR [QuartzScheduler_Worker-4] [LazyInitializer] Exception initializing proxy net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:47) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.bamboo.chains.DefaultChain$$EnhancerByCGLIB$$eb45b624.getBuildDefinition(<generated>) at com.atlassian.bamboo.build.DefaultBuildDefinitionManager.getBuildDefinitionFromBuild(DefaultBuildDefinitionManager.java:194) at com.atlassian.bamboo.build.DefaultBuildDefinitionManager.getBuildDefinition(DefaultBuildDefinitionManager.java:81) at com.atlassian.bamboo.plan.AbstractPlan.getBuildDefinition(AbstractPlan.java:251) at com.atlassian.bamboo.schedule.DefaultPlanScheduler$1.run(DefaultPlanScheduler.java:30) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:322) at com.atlassian.bamboo.schedule.DefaultPlanScheduler.removeSchedulingJobs(DefaultPlanScheduler.java:26) at com.atlassian.bamboo.deletion.DeletionServiceImpl$1$3.call(DeletionServiceImpl.java:295) at com.atlassian.bamboo.deletion.DeletionServiceImpl$1$3.call(DeletionServiceImpl.java:292) at com.atlassian.bamboo.deletion.DeletionServiceImpl.withUtilTimerStack(DeletionServiceImpl.java:353) at com.atlassian.bamboo.deletion.DeletionServiceImpl.access$200(DeletionServiceImpl.java:39) at com.atlassian.bamboo.deletion.DeletionServiceImpl$1.call(DeletionServiceImpl.java:290) at com.atlassian.bamboo.deletion.DeletionServiceImpl$1.call(DeletionServiceImpl.java:252) at com.atlassian.bamboo.deletion.DeletionServiceImpl.withUtilTimerStack(DeletionServiceImpl.java:353) at com.atlassian.bamboo.deletion.DeletionServiceImpl.tearDownPlan(DeletionServiceImpl.java:250) at com.atlassian.bamboo.deletion.DeletionServiceImpl.deleteResultsAndPlan(DeletionServiceImpl.java:239) at com.atlassian.bamboo.deletion.DeletionServiceImpl.deletePlans(DeletionServiceImpl.java:226) at com.atlassian.bamboo.deletion.DeletionServiceImpl.executeDelayedDeletion(DeletionServiceImpl.java:169) at sun.reflect.GeneratedMethodAccessor573.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:30) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy65.executeDelayedDeletion(Unknown Source) at com.atlassian.bamboo.deletion.DeletionServiceJob.execute(DeletionServiceJob.java:22) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at com.atlassian.bamboo.quartz.SystemAuthorizedThreadPool$1.run(SystemAuthorizedThreadPool.java:36) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)

    Atlassian JIRA | 6 years ago | Brydie McCoy [Atlassian]
    net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed
  6. 0

    Discovered and needed for sharing files in : https://bitbucket.org/atlassian/confluence-share-page-plugin/pull-request/26/confdev-26035-add-share-attachment-feature#comment-4038533 {code} net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:47) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$23c0d2c4.getKey(<generated>) at com.atlassian.confluence.util.GeneralUtil.toDisplayUrl(GeneralUtil.java:492) at com.atlassian.confluence.util.GeneralUtil.getPageUrl(GeneralUtil.java:382) at com.atlassian.confluence.pages.AbstractPage.getUrlPath(AbstractPage.java:126) at com.atlassian.confluence.api.impl.service.content.factory.ContentFactory.addCommonFieldsToBuilder(ContentFactory.java:137) at com.atlassian.confluence.api.impl.service.content.factory.ContentFactory.buildFromContentConvertible(ContentFactory.java:112) at com.atlassian.confluence.api.impl.service.content.factory.ContentFactory.buildFrom(ContentFactory.java:89) at com.atlassian.confluence.api.impl.service.content.factory.ContentFactory.makeContainer(ContentFactory.java:204) at com.atlassian.confluence.api.impl.service.content.factory.ContentFactory.addCommonFieldsToBuilder(ContentFactory.java:124) at com.atlassian.confluence.api.impl.service.content.factory.AttachmentFactory.buildFrom(AttachmentFactory.java:40) at com.atlassian.confluence.api.impl.service.content.typebinding.AttachmentContentTypeApiSupport.getById(AttachmentContentTypeApiSupport.java:124) at com.atlassian.confluence.api.impl.service.content.AttachmentServiceImpl$AttachmentFinderImpl.fetchMany(AttachmentServiceImpl.java:184) at com.atlassian.confluence.api.impl.service.content.AttachmentServiceImpl$AttachmentFinderImpl.fetchOne(AttachmentServiceImpl.java:229) at com.atlassian.confluence.plugins.sharepage.notifications.context.attachment.AbstractShareAttachmentEventRenderContextProvider.getAttachment(AbstractShareAttachmentEventRenderContextProvider.java:135) at com.atlassian.confluence.plugins.sharepage.notifications.context.attachment.AbstractShareAttachmentEventRenderContextProvider.getContentForEntityId(AbstractShareAttachmentEventRenderContextProvider.java:62) at com.atlassian.confluence.plugins.sharepage.notifications.context.AbstractShareEventRenderContextProvider.basicContext(AbstractShareEventRenderContextProvider.java:197) at com.atlassian.confluence.plugins.sharepage.notifications.context.AbstractShareEventRenderContextProvider.checkedCreate(AbstractShareEventRenderContextProvider.java:116) at com.atlassian.confluence.notifications.RenderContextProviderTemplate.create(RenderContextProviderTemplate.java:26) at com.atlassian.confluence.notifications.impl.spi.DeclarativeRenderContextFactory.buildRecipientProviderContext(DeclarativeRenderContextFactory.java:191) at com.atlassian.confluence.notifications.impl.spi.DeclarativeRenderContextFactory.access$400(DeclarativeRenderContextFactory.java:44) at com.atlassian.confluence.notifications.impl.spi.DeclarativeRenderContextFactory$2.call(DeclarativeRenderContextFactory.java:139) at com.atlassian.confluence.notifications.impl.spi.DeclarativeRenderContextFactory$2.call(DeclarativeRenderContextFactory.java:122) at com.atlassian.confluence.user.AuthenticatedUserImpersonator$2.call(AuthenticatedUserImpersonator.java:134) at com.atlassian.confluence.user.AuthenticatedUserImpersonator$1.call(AuthenticatedUserImpersonator.java:113) at com.atlassian.confluence.user.AuthenticatedUserImpersonator.asUser(AuthenticatedUserImpersonator.java:89) at com.atlassian.confluence.notifications.impl.spi.DeclarativeRenderContextFactory$1.call(DeclarativeRenderContextFactory.java:97) at com.atlassian.confluence.notifications.impl.spi.DeclarativeRenderContextFactory$1.call(DeclarativeRenderContextFactory.java:94) at com.atlassian.confluence.notifications.impl.DefaultFakeHttpRequestInjector$1.doFilter(DefaultFakeHttpRequestInjector.java:51) at com.atlassian.core.filters.ServletContextThreadLocalFilter.doFilter(ServletContextThreadLocalFilter.java:21) at com.atlassian.confluence.notifications.impl.DefaultFakeHttpRequestInjector.withRequest(DefaultFakeHttpRequestInjector.java:46) at com.atlassian.confluence.notifications.impl.spi.DeclarativeRenderContextFactory.createChecked(DeclarativeRenderContextFactory.java:94) at com.atlassian.plugin.notifications.api.medium.RenderContextFactoryTemplate.create(RenderContextFactoryTemplate.java:53) at sun.reflect.GeneratedMethodAccessor675.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy1412.create(Unknown Source) at com.atlassian.plugin.notifications.dispatcher.task.IndividualNotificationTask$UserKeySender.send(IndividualNotificationTask.java:157) at com.atlassian.plugin.notifications.dispatcher.task.IndividualNotificationTask.execute(IndividualNotificationTask.java:64) at com.atlassian.plugin.notifications.dispatcher.AbstractNotificationTask.run(AbstractNotificationTask.java:111) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) {code}

    Atlassian JIRA | 2 years ago | Steve Lancashire [Atlassian]
    net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed

    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. net.sf.hibernate.HibernateException

      Could not initialize proxy - the owning Session was closed at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:47) at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:60) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.confluence.spaces.Space$$EnhancerByCGLIB$$6c6ddc66.getKey() at com.atlassian.confluence.core.SpaceContentEntityObject.hashCode(SpaceContentEntityObject.java:36)

      at net.sf.hibernate.engine.TypedValue.hashCode()
    2. net.sf.hibernate
      TypedValue.hashCode
      1. net.sf.hibernate.engine.TypedValue.hashCode(TypedValue.java:45)
      1 frame
    3. Java RT
      AbstractMap.hashCode
      1. java.util.HashMap$Entry.hashCode(HashMap.java:707)
      2. java.util.AbstractMap.hashCode(AbstractMap.java:556)
      2 frames
    4. net.sf.hibernate
      QueryKey.hashCode
      1. net.sf.hibernate.cache.QueryKey.hashCode(QueryKey.java:63)
      1 frame
    5. Java RT
      HashMap.put
      1. java.util.HashMap.hash(HashMap.java:261)
      2. java.util.HashMap.removeEntryForKey(HashMap.java:538)
      3. java.util.LinkedHashMap.addEntry(LinkedHashMap.java:396)
      4. java.util.HashMap.put(HashMap.java:392)
      4 frames
    6. Ehcache
      Plugin.put
      1. net.sf.ehcache.store.MemoryStore.put(MemoryStore.java:177)
      2. net.sf.ehcache.Cache.put(Cache.java:318)
      3. net.sf.ehcache.hibernate.Plugin.put(Plugin.java:146)
      3 frames