-->
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.  [ 5 posts ] 
Author Message
 Post subject: OSCache : could not destroy cache
PostPosted: Fri May 28, 2004 3:56 pm 
Beginner
Beginner

Joined: Thu May 06, 2004 4:06 pm
Posts: 25
Hello,

When calling sessionFactory.close(), i get a NullPointerException. From the error, it seems that the cache could not be destroyed because of the NullPointerException.

Exception:

Code:
12:51:47,832  WARN ReadWriteCache:218 - could not destroy cache
java.lang.NullPointerException
        at com.opensymphony.oscache.base.AbstractCacheAdministrator.finalizeListeners(AbstractCacheAdministrator.java:323)
        at com.opensymphony.oscache.general.GeneralCacheAdministrator.destroy(GeneralCacheAdministrator.java:168)
        at net.sf.hibernate.cache.OSCache.destroy(OSCache.java:59)
        at net.sf.hibernate.cache.ReadWriteCache.destroy(ReadWriteCache.java:215)
        at net.sf.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:542)


There is a post with a similar problem, but with no reply:

http://forum.hibernate.org/viewtopic.php?t=928696

Any ideas? Thanks

I am using:

Hibernate 2.1.3
OSCache 2.0.2


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 29, 2004 1:07 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Um, since the NPE originates inside OSCache, I guess it is better to direct your question to OSCache guys. Try putting the src for OSCache in your sourcepath and using your debugger.


Top
 Profile  
 
 Post subject: same here
PostPosted: Sat May 29, 2004 5:02 pm 
Newbie

Joined: Fri Feb 20, 2004 9:03 pm
Posts: 5
Location: Montreal, QC
Level WARN
Logger net.sf.hibernate.cache.ReadWriteCache
Message could not destroy cache
Class net.sf.hibernate.cache.ReadWriteCache
Method destroy
Line 218
File ReadWriteCache.java
Properties {{log4j.remoteSourceInfo,localhost:55403}{log4jid,5}}

Throwable
java.lang.NullPointerException at com.opensymphony.oscache.base.AbstractCacheAdministrator.finalizeListeners(AbstractCacheAdministrator.java:326) at
com.opensymphony.oscache.general.GeneralCacheAdministrator.destroy(GeneralCacheAdministrator.java:187) at
net.sf.hibernate.cache.OSCache.destroy(OSCache.java:51) at
net.sf.hibernate.cache.ReadWriteCache.destroy(ReadWriteCache.java:215) at
net.sf.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:536) at
org.springframework.orm.hibernate.LocalSessionFactoryBean.destroy(LocalSessionFactoryBean.java:565) at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.destroyBean(AbstractAutowireCapableBeanFactory.java:740) at
org.springframework.beans.factory.support.AbstractBeanFactory.destroySingleton(AbstractBeanFactory.java:363) at
org.springframework.beans.factory.support.AbstractBeanFactory.destroySingletons(AbstractBeanFactory.java:349) at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.destroySingletons(AbstractAutowireCapableBeanFactory.java:718) at
org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:382) at
org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:178) at
org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:63) at
org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3816) at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4429) at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:2986) at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:1019) at
org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:524) at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:147) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257) at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:587) at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195) at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156) at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)

_________________
When nothing can possibly go wrong, it will.


Top
 Profile  
 
 Post subject: OSCache : Could not destroy cache : OutOfMemoryException?
PostPosted: Fri Jun 04, 2004 6:42 pm 
Beginner
Beginner

Joined: Thu May 06, 2004 4:06 pm
Posts: 25
I could be wrong, but I think the above errors are leading to an OutOfMemory exception. When i start/stop my WebModule in Tomcat, a few times, I eventually get an OutOfMemory exception.

If the Cache is not destroyed, could it be lingering around the in the Tomcat JVM?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 09, 2004 6:48 pm 
Beginner
Beginner

Joined: Thu May 06, 2004 4:06 pm
Posts: 25
gavin wrote:
Um, since the NPE originates inside OSCache, I guess it is better to direct your question to OSCache guys. Try putting the src for OSCache in your sourcepath and using your debugger.


...this NPE was causing a memory leak. :(

However, I recently upgraded to hibernate v2.1.4, and problem solved.

elendal: Can you upgrade, and let me know if this fixes your NPE?

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.