[jboss-jira] [JBoss JIRA] Resolved: (JBCACHE-1319) NPE with CacheMode.LOCAL and buddy replication enabled

Manik Surtani (JIRA) jira-events at lists.jboss.org
Mon Apr 7 04:48:21 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBCACHE-1319?page=all ]

Manik Surtani resolved JBCACHE-1319.
------------------------------------

    Resolution: Done

> NPE with CacheMode.LOCAL and buddy replication enabled
> ------------------------------------------------------
>
>                 Key: JBCACHE-1319
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1319
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.1.0.GA
>            Reporter: Brian Stansberry
>         Assigned To: Manik Surtani
>            Priority: Minor
>             Fix For: 2.1.1.GA
>
>
> Proving the theory no good deed goes unpunished, the fix for JBCACHE-1311 results in an NPE if a cache is configured for local mode but has BR enabled. Minor issue, as this isn't a meaningful config; just cropped up in an AS unit test one of whose permutations by chance used such a config:
> NPE is from ResponseValdityFilter, which passes a null members list to new ArrayList(Collection):
> java.lang.NullPointerException
> 	at java.util.ArrayList.<init>(ArrayList.java:133)
> 	at org.jboss.cache.interceptors.DataGravitatorInterceptor$ResponseValidityFilter.<init>(DataGravitatorInterceptor.java:482)
> 	at org.jboss.cache.interceptors.DataGravitatorInterceptor.gravitateData(DataGravitatorInterceptor.java:338)
> 	at org.jboss.cache.interceptors.DataGravitatorInterceptor.remoteBackupGet(DataGravitatorInterceptor.java:286)
> 	at org.jboss.cache.interceptors.DataGravitatorInterceptor.handleGetMethod(DataGravitatorInterceptor.java:184)
> 	at org.jboss.cache.interceptors.DataGravitatorInterceptor.handleGetKeyValueMethod(DataGravitatorInterceptor.java:100)
> 	at org.jboss.cache.interceptors.MethodDispacherInterceptor.invoke(MethodDispacherInterceptor.java:84)
> 	at org.jboss.cache.interceptors.Interceptor.nextInterceptor(Interceptor.java:111)
> 	at org.jboss.cache.interceptors.MethodDispacherInterceptor.invoke(MethodDispacherInterceptor.java:58)
> 	at org.jboss.cache.interceptors.Interceptor.nextInterceptor(Interceptor.java:111)
> 	at org.jboss.cache.interceptors.CacheLoaderInterceptor.handleGetKeyValueMethod(CacheLoaderInterceptor.java:146)
> 	at org.jboss.cache.interceptors.ActivationInterceptor.handleGetKeyValueMethod(ActivationInterceptor.java:118)
> 	at org.jboss.cache.interceptors.MethodDispacherInterceptor.invoke(MethodDispacherInterceptor.java:84)
> 	at org.jboss.cache.interceptors.Interceptor.nextInterceptor(Interceptor.java:111)
> 	at org.jboss.cache.interceptors.PessimisticLockInterceptor.handleGetKeyValueMethod(PessimisticLockInterceptor.java:347)
> 	at org.jboss.cache.interceptors.MethodDispacherInterceptor.invoke(MethodDispacherInterceptor.java:84)
> 	at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:81)
> 	at org.jboss.cache.interceptors.Interceptor.nextInterceptor(Interceptor.java:111)
> 	at org.jboss.cache.interceptors.MethodDispacherInterceptor.invoke(MethodDispacherInterceptor.java:58)
> 	at org.jboss.cache.interceptors.Interceptor.nextInterceptor(Interceptor.java:111)
> 	at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:456)
> 	at org.jboss.cache.interceptors.TxInterceptor.handleGetKeyValueMethod(TxInterceptor.java:250)
> 	at org.jboss.cache.interceptors.MethodDispacherInterceptor.invoke(MethodDispacherInterceptor.java:84)
> 	at org.jboss.cache.interceptors.Interceptor.nextInterceptor(Interceptor.java:111)
> 	at org.jboss.cache.interceptors.CacheMgmtInterceptor.handleGetKeyValueMethod(CacheMgmtInterceptor.java:81)
> 	at org.jboss.cache.interceptors.MethodDispacherInterceptor.invoke(MethodDispacherInterceptor.java:84)
> 	at org.jboss.cache.interceptors.Interceptor.nextInterceptor(Interceptor.java:111)
> 	at org.jboss.cache.interceptors.InvocationContextInterceptor.invoke(InvocationContextInterceptor.java:73)
> 	at org.jboss.cache.invocation.AbstractInvocationDelegate.invoke(AbstractInvocationDelegate.java:123)
> 	at org.jboss.cache.invocation.AbstractInvocationDelegate.invoke(AbstractInvocationDelegate.java:64)
> 	at org.jboss.cache.invocation.CacheInvocationDelegate.get(CacheInvocationDelegate.java:387)
> 	at org.jboss.web.tomcat.service.session.JBossCacheWrapper.get(JBossCacheWrapper.java:80)
> 	at org.jboss.web.tomcat.service.session.JBossCacheService.loadSession(JBossCacheService.java:312)
> 	at org.jboss.web.tomcat.service.session.JBossCacheManager.loadSession(JBossCacheManager.java:1189)
> 	at org.jboss.web.tomcat.service.session.JBossCacheManager.findSession(JBossCacheManager.java:933)
> 	at org.jboss.test.cluster.defaultcfg.simpleweb.test.SessionCountUnitTestCase.createAndUseSession(SessionCountUnitTestCase.java:951)
> 	at org.jboss.test.cluster.defaultcfg.simpleweb.test.SessionCountUnitTestCase.standaloneWarRedeployTest(SessionCountUnitTestCase.java:695)
> 	at org.jboss.test.cluster.defaultcfg.simpleweb.test.SessionCountUnitTestCase.testStandaloneRestart(SessionCountUnitTestCase.java:673)
> One fix is to check for null in the ResponseValidityFilter constructor. Probably better is to detect the CacheMode.LOCAL and don't initialize the whole BR subsystem.

-- 
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