if hibernate.cache.use_query_cache=true
I get the below exception(The net.sf.hibernate.cache.UpdateTimestampsCache Cache is not alive) when i try to insert/update a BO.
if hibernate.cache.use_query_cache=false; i am able to update/insert BO.
Any help or advice appreciated.
Config
Code:
Hibernate 2.1.4
net.sf.ehcache.hibernate.Provider
Oracle 9x
Code
Code:
Session session = sf.openSession();
Connection c = session.connection();
Review r = new ReviewImpl("raj", 2, "sdf", true);
session.save(r);
session.flush();
session.close();
Mapping
Code:
<hibernate-mapping>
<class name="uk.co.ReviewImpl" proxy="uk.co.idbs.product.Review" table="pd_reviews">
<cache usage="read-write"/>
<id name="id" column="id" type="string" unsaved-value="null">
<generator class="uuid.hex"/>
</id>
<version name="auditVersion"/>
<property name="reviewer" type="string"/>
<property name="score" type="integer"/>
<property name="comment" type="string" column="cment"/>
<property name="buyAgain" type="yes_no"/>
</class>
</hibernate-mapping>
Exception
Code:
Caused by: net.sf.hibernate.cache.CacheException: java.lang.IllegalStateException: The net.sf.hibernate.cache.UpdateTimestampsCache Cache is not alive.
at net.sf.ehcache.hibernate.Plugin.put(Plugin.java:149)
at net.sf.hibernate.cache.UpdateTimestampsCache.preinvalidate(UpdateTimestampsCache.java:42)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2413)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2367)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2236)
at idbs.impl.keystone.provider.hibernate.HibernateConnection.flush(HibernateConnection.java:459)
... 6 more
Caused by: java.lang.IllegalStateException: The net.sf.hibernate.cache.UpdateTimestampsCache Cache is not alive.
at net.sf.ehcache.Cache.checkStatus(Cache.java:408)
at net.sf.ehcache.Cache.put(Cache.java:201)
at net.sf.ehcache.hibernate.Plugin.put(Plugin.java:145)