[jboss-jira] [JBoss JIRA] Created: (JBCACHE-1346) NullPointerException thrown by CacheInvocationDelegate

Galder Zamarreno (JIRA) jira-events at lists.jboss.org
Wed May 14 16:53:27 EDT 2008


NullPointerException thrown by CacheInvocationDelegate
------------------------------------------------------

                 Key: JBCACHE-1346
                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1346
             Project: JBoss Cache
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Cache loaders
            Reporter: Galder Zamarreno
         Assigned To: Galder Zamarreno
             Fix For: 2.2.0.GA


New bug introduced in JBossCache 2.2.x when setting up Singleton Store 
Cache Loader.

Caused by: java.lang.NullPointerException
        at org.jboss.cache.invocation.CacheInvocationDelegate.addCacheListener(CacheInvocationDelegate.java:247)
        at org.jboss.cache.loader.SingletonStoreCacheLoader.setCache(SingletonStoreCacheLoader.java:144)
        at org.jboss.cache.loader.CacheLoaderManager.setCacheInLoader(CacheLoaderManager.java:272)
        at org.jboss.cache.loader.CacheLoaderManager.createCacheLoader(CacheLoaderManager.java:250)
        at org.jboss.cache.loader.CacheLoaderManager.createCacheLoader(CacheLoaderManager.java:182)
        at org.jboss.cache.loader.CacheLoaderManager.injectDependencies(CacheLoaderManager.java:90)

The problem arises from the fact that SingletonStoreCacheLoader tries to 
add a cache listener before CacheInvocationDelegate has been initialised:

SingletonStoreCacheLoader:

   @Override
   public void setCache(CacheSPI c)
   {
      super.setCache(c);

      c.addCacheListener(new SingletonStoreListener());
   }

Listener probably needs to be added at some kind of start() method.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list