History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CACHE-154
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andres March
Reporter: Dennis Muhlestein
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
OSCache

NullPointerException in JavaGroupsBroadcastingListener

Created: 18/Mar/05 03:17 PM   Updated: 06/Nov/05 11:19 AM
Component/s: Listeners
Affects Version/s: 2.1, 2.0.2, 2.1.1
Fix Version/s: 2.2 RC

Environment:
Hibernate (2.1.x) w/ JavaGroups Clustering
OSCacheProvider from wiki or default OSCacheProvider from Hibernate result in same exception.
Problem does not seem to be dependant on Operating System.
Produced w/
 Tomcat 5.5.4 & 5.0.2x
 sun-jdk-1.5.0 & 1.4.2


 Description  « Hide
This happens for NonstrictReadWriteCache and for ReadWriteCache when the application needs to be restarted or stopped.

2005-03-18 11:49:45,977 WARN net.sf.hibernate.cache.ReadWriteCache - could not destroy cache
java.lang.NullPointerException
        at com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener.finialize(JavaGroupsBroadcastingListener.java:135)
        at com.opensymphony.oscache.base.AbstractCacheAdministrator.finalizeListeners(AbstractCacheAdministrator.java:367)
        at com.opensymphony.oscache.general.GeneralCacheAdministrator.destroy(GeneralCacheAdministrator.java:192)
        at net.sf.hibernate.cache.OSCache.destroy(OSCache.java:59)
        at net.sf.hibernate.cache.ReadWriteCache.destroy(ReadWriteCache.java:219)
        at net.sf.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:545)
        at com.ldspromise.db.util.HibernateUtil.destroy(HibernateUtil.java:52)

Basically, the line bus.stop() is called when bus is already null.

I think there may be a more involved problem here though because bus should probably not be null. ie: was bus ever not null?

To reproduce, all you have to do is have a hibernate class that uses cache="read-write" or cache="nonstrict-read-write" configured in hibernate. Then try stopping the application.

 All   Comments   Change History      Sort Order:
Lars Torunski - [19/Mar/05 07:35 AM ]
- Fix avoids NullPointerException
- but why wasn't the notification bus initialized or finialize was invoked before?