-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: While persisting objects Hibernate throws CacheException
PostPosted: Thu Aug 03, 2006 1:51 pm 
Newbie

Joined: Thu Jan 26, 2006 1:10 pm
Posts: 6
Hi All,

I am getting cache exception when trying to persist objects.
This behavior is very strange.

Any one help me in this regard.

I would appreciate all helps.

Regards,

Sam
Hibernate version:
3.0

Mapping documents:

ehcache.xml:
<?xml version="1.0" encoding="UTF-8"?>
<ehcache>
<!-- Default temp file path-->
<diskStore path="java.io.tmp"/>
<!--The default region for all cached objects that don't have a specific cache element -->
<defaultCache
maxElementsInMemory="10"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"/>
</ehcache>

Code between sessionFactory.openSession() and session.close():
tx = session.beginTransaction();
exp.setdescr(descr);
exp.setremarks(remarks);
exp.setexclude(b);
exp.setdtAdded(date);
exp.setuseridAdded(user);
session.save(exp);
tx.commit();

Full stack trace of any exception that occurs:

org.hibernate.cache.CacheException: java.lang.IllegalStateException: The org.hibernate.cache.UpdateTimestampsCache Cache is not alive. at org.hibernate.cache.EhCache.put(EhCache.java:159)
java.lang.IllegalStateException: The org.hibernate.cache.UpdateTimestampsCache Cache is not alive. at net.sf.ehcache.Cache.checkStatus(Cache.java:713)
Complete stack trace:
at net.sf.ehcache.Cache.checkStatus(Cache.java:713)
at net.sf.ehcache.Cache.put(Cache.java:313)
at org.hibernate.cache.EhCache.put(EhCache.java:153)
at org.hibernate.cache.UpdateTimestampsCache.preinvalidate(UpdateTimestampsCache.java:54)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:235)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:240)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:160)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:95)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:184)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:173)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:481)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:476)
at com.un.itsd.mgt.bizlogic.viewManager.SaveExpForecast(viewManager.java:913)
at com.un.itsd.mgt.struts.action.ExpForecastsEditAction.execute(ExpForecastsEditAction.java:57)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

DEBUG [http-8080-Processor24] (NullableType.java:86) - returning '1' as column: col_0_0_
DEBUG [http-8080-Processor24] (NullableType.java:86) - returning '2006-2007' as column: col_1_0_
DEBUG [http-8080-Processor24] (Loader.java:429) - done processing result set (2563 rows)
DEBUG [http-8080-Processor24] (AbstractBatcher.java:313) - about to close ResultSet (open ResultSets: 1, globally: 1)
DEBUG [http-8080-Processor24] (AbstractBatcher.java:298) - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG [http-8080-Processor24] (AbstractBatcher.java:416) - closing statement
DEBUG [http-8080-Processor24] (PersistenceContext.java:789) - initializing non-lazy collections
DEBUG [http-8080-Processor24] (JDBCTransaction.java:83) - commit
DEBUG [http-8080-Processor24] (SessionImpl.java:323) - automatically flushing session
DEBUG [http-8080-Processor24] (JDBCContext.java:278) - before transaction completion
DEBUG [http-8080-Processor24] (SessionImpl.java:372) - before transaction completion
DEBUG [http-8080-Processor24] (JDBCTransaction.java:96) - committed JDBC Connection
DEBUG [http-8080-Processor24] (JDBCContext.java:283) - after transaction completion
DEBUG [http-8080-Processor24] (SessionImpl.java:403) - after transaction completion
DEBUG [http-8080-Processor24] (SessionImpl.java:269) - closing session
DEBUG [http-8080-Processor24] (ConnectionManager.java:317) - closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
DEBUG [http-8080-Processor24] (DriverManagerConnectionProvider.java:129) - returning connection to pool, pool size: 1
DEBUG [http-8080-Processor24] (JDBCContext.java:283) - after transaction completion
DEBUG [http-8080-Processor24] (SessionImpl.java:403) - after transaction completion
INFO [http-8080-Processor24] (SessionFactoryImpl.java:776) - closing
DEBUG [http-8080-Processor24] (CacheManager.java:196) - Attempting to create an existing instance. Existing instance returned.
DEBUG [http-8080-Processor24] (DiskStore.java:444) - Deleting file org.hibernate.cache.StandardQueryCache.data
DEBUG [Store org.hibernate.cache.StandardQueryCache Expiry Thread] (DiskStore.java:649) - org.hibernate.cache.StandardQueryCacheCache: Expiry thread interrupted on Disk Store.
DEBUG [http-8080-Processor24] (CacheManager.java:196) - Attempting to create an existing instance. Existing instance returned.
INFO [http-8080-Processor24] (DriverManagerConnectionProvider.java:147) - cleaning up connection pool: jdbc:sybase:Tds:IMISDB32:3010/itsdmgt?charset=iso_1
DEBUG [http-8080-Processor24] (SessionImpl.java:250) - opened session at timestamp: 4729351552888832
DEBUG [http-8080-Processor24] (JDBCTransaction.java:46) - begin
DEBUG [http-8080-Processor24] (ConnectionManager.java:296) - opening JDBC connection
DEBUG [http-8080-Processor24] (DriverManagerConnectionProvider.java:93) - total checked-out connections: 0
DEBUG [http-8080-Processor24] (DriverManagerConnectionProvider.java:109) - opening new JDBC connection
DEBUG [http-8080-Processor24] (DriverManagerConnectionProvider.java:115) - created connection to: jdbc:sybase:Tds:IMISDB32:3010/itsdmgt?charset=iso_1, Isolation Level: 2
DEBUG [http-8080-Processor24] (JDBCTransaction.java:50) - current autocommit status: false
DEBUG [http-8080-Processor24] (DefaultSaveOrUpdateEventListener.java:159) - saving transient instance
DEBUG [http-8080-Processor24] (AbstractSaveEventListener.java:133) - saving [com.un.itsd.mgt.hibernate.mapping.ExpForecasts#<null>]
DEBUG [http-8080-Processor24] (AbstractSaveEventListener.java:195) - executing insertions
DEBUG [http-8080-Processor24] (UpdateTimestampsCache.java:51) - Pre-invalidating space [exp_forecasts]
DEBUG [http-8080-Processor24] (JDBCTransaction.java:132) - rollback
DEBUG [http-8080-Processor24] (JDBCContext.java:278) - before transaction completion
DEBUG [http-8080-Processor24] (SessionImpl.java:372) - before transaction completion
DEBUG [http-8080-Processor24] (JDBCTransaction.java:143) - rolled back JDBC Connection
DEBUG [http-8080-Processor24] (JDBCContext.java:283) - after transaction completion
DEBUG [http-8080-Processor24] (SessionImpl.java:403) - after transaction completion
DEBUG [http-8080-Processor24] (UpdateTimestampsCache.java:64) - Invalidating space [exp_forecasts], timestamp: 4729351553462272
ERROR [http-8080-Processor24] (ActionQueue.java:176) - could not release a cache lock
org.hibernate.cache.CacheException: java.lang.IllegalStateException: The org.hibernate.cache.UpdateTimestampsCache Cache is not alive.
at org.hibernate.cache.EhCache.put(EhCache.java:159)
at org.hibernate.cache.UpdateTimestampsCache.invalidate(UpdateTimestampsCache.java:67)
at org.hibernate.engine.ActionQueue.afterTransactionCompletion(ActionQueue.java:171)
at org.hibernate.impl.SessionImpl.afterTransactionCompletion(SessionImpl.java:406)
at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:294)
at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:154)
at com.un.itsd.mgt.bizlogic.viewManager.SaveExpForecast(viewManager.java:919)
at com.un.itsd.mgt.struts.action.ExpForecastsEditAction.execute(ExpForecastsEditAction.java:57)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalStateException: The org.hibernate.cache.UpdateTimestampsCache Cache is not alive.
at net.sf.ehcache.Cache.checkStatus(Cache.java:713)
at net.sf.ehcache.Cache.put(Cache.java:313)
at org.hibernate.cache.EhCache.put(EhCache.java:153)
... 27 more
DEBUG [http-8080-Processor24] (SessionImpl.java:269) - closing session
DEBUG [http-8080-Processor24] (ConnectionManager.java:317) - closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
DEBUG [http-8080-Processor24] (DriverManagerConnectionProvider.java:129) - returning connection to pool, pool size: 1
DEBUG [http-8080-Processor24] (JDBCContext.java:283) - after transaction completion
DEBUG [http-8080-Processor24] (SessionImpl.java:403) - after transaction completion
INFO [http-8080-Processor24] (SessionFactoryImpl.java:776) - closing
DEBUG [http-8080-Processor24] (CacheManager.java:191) - Creating new CacheManager with default config
DEBUG [http-8080-Processor24] (CacheManager.java:164) - Configuring ehcache from classpath.
DEBUG [http-8080-Processor24] (Configurator.java:121) - Configuring ehcache from ehcache.xml found in the classpath: file:/C:/Tomcat%205/webapps/itsdmgt/WEB-INF/classes/ehcache.xml
DEBUG [http-8080-Processor24] (Configuration.java:185) - Disk Store Path: java.io.tmp
DEBUG [http-8080-Processor24] (CacheManager.java:196) - Attempting to create an existing instance. Existing instance returned.
INFO [http-8080-Processor24] (DriverManagerConnectionProvider.java:147) - cleaning up connection pool: jdbc:sybase:Tds:IMISDB32:3010/itsdmgt?charset=iso_1
ERROR [http-8080-Processor24] (ExaExceptionUtil.java:48) - Exception Manager


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.