-->
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.  [ 3 posts ] 
Author Message
 Post subject: java.lang.IllegalStateException: in ehcache
PostPosted: Wed Feb 08, 2006 6:11 am 
Newbie

Joined: Wed Feb 08, 2006 5:57 am
Posts: 7
Hi,
I have a junit TestCase with multiple Testmethods. For each Test Method the sessionFactory is closed and opened again (with a new Configuration Object). This works with most testcases, but after some restarts I get always this exception. Is there any way to get more information, why the cache is not alive?
bye
Roland

Hibernate version: 2.1.8
ehcache: 1.1
jdk 1.5
Full stack trace of any exception that occurs:
10:48:55,447 [main] ERROR The org.jbpm.model.definition.impl.NodeImpl Cache is not alive. -- at de.mtu.eprotas.application.process.engine.impl.EngineManagerImpl.createProcess(EngineManagerImpl.java:351)
java.lang.IllegalStateException: The org.jbpm.model.definition.impl.NodeImpl Cache is not alive.
at net.sf.ehcache.Cache.checkStatus(Cache.java:713)
at net.sf.ehcache.Cache.get(Cache.java:355)
at net.sf.hibernate.cache.EhCache.get(EhCache.java:108)
at net.sf.hibernate.cache.NonstrictReadWriteCache.get(NonstrictReadWriteCache.java:41)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2122)
at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:2001)
at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1963)
at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:69)
at net.sf.hibernate.type.EntityType.resolveIdentifier(EntityType.java:208)
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2219)
at net.sf.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:319)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:309)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
at net.sf.hibernate.loader.Loader.list(Loader.java:1054)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1531)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1527)
at org.jbpm.persistence.hibernate.HibernateSession.findLatestDefinition(HibernateSession.java:248)
at org.jbpm.impl.ExecutionReadServiceImpl.getLatestDefinition(ExecutionReadServiceImpl.java:51)
at org.jbpm.impl.ExecutionServiceImpl.startProcessInstance(ExecutionServiceImpl.java:46)
at de.mtu.eprotas.application.process.engine.impl.EngineManagerImpl.createProcess(EngineManagerImpl.java:347)
at de.mtu.eprotas.application.process.instance.impl.ProcessInstanceManagerImpl.createProcessInstance(ProcessInstanceManagerImpl.java:184)
at de.mtu.eprotas.service.process.impl.ProcessServiceImpl.createProcess(ProcessServiceImpl.java:250)
at de.mtu.eprotas.test.impl.RepositoryBasedTestCase.createProcessForDefinition(RepositoryBasedTestCase.java:474)
at de.mtu.eprotas.test.impl.RepositoryBasedTestCase.createProcessForDefinition(RepositoryBasedTestCase.java:405)
at de.mtu.eprotas.application.util.expression.interpreter.ExpressionLanguageTest.testStringlist(ExpressionLanguageTest.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Name and version of the database you are using:hsqldb 1.8.0.2


Top
 Profile  
 
 Post subject: Problem in cache
PostPosted: Wed Feb 08, 2006 9:56 am 
Newbie

Joined: Wed Feb 08, 2006 5:57 am
Posts: 7
After some debugging, it looks like that the problem is in the EntityPersister. When the session tries to load an element, the EntityPersister still points to an old NonStrictReadWriteCache. The entityPersister, SessionFactory, Session are new objects.


Top
 Profile  
 
 Post subject: problem solved
PostPosted: Wed Feb 08, 2006 10:54 am 
Newbie

Joined: Wed Feb 08, 2006 5:57 am
Posts: 7
Sorry,
I had still a static reference to an old sessionFactory, which was occasionally used.


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

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.