[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: demionfo  XML
Profile for demionfo -> Messages posted by demionfo [1]
Author Message
Added Terracotta in my project Shiro+Ehcach+Spring+Hibernate.

file ehcache.xml:
<cache name="shiro-activeSessionCache"
maxElementsInMemory="100000"
eternal="true"
timeToLiveSeconds="0"
timeToIdleSeconds="0"
diskPersistent="false"
overflowToDisk="false"
diskExpiryThreadIntervalSeconds="120">

<terracotta/>
</cache>
<terracottaConfig url="localhost:9510"/>

file shiro.xml

<bean id="cacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager" >
<property name="cacheManagerConfigFile" value="classpath:ehcache.xml" />
</bean>

<bean id="sessionDAO"
class="org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO">
<property name="activeSessionsCacheName" value="shiro-activeSessionCache" />
</bean>

I get the following error:

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.identity.Identity.roles, no session or session was closed

Please help me !! What I missed in the Terracotta or Hibernate?

Thanks in advance.
 
Profile for demionfo -> Messages posted by demionfo [1]
Go to:   
Powered by JForum 2.1.7 © JForum Team