[infinispan-issues] [JBoss JIRA] Commented: (ISPN-779) DefaultCacheManager.removeListener throwing NPE when server stopped

Galder Zamarreño (JIRA) jira-events at lists.jboss.org
Wed Nov 17 12:47:45 EST 2010


    [ https://jira.jboss.org/browse/ISPN-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563866#comment-12563866 ] 

Galder Zamarreño commented on ISPN-779:
---------------------------------------

Hmmm, it appears that the GlobalComponentRegistry has a shutdown hook as well. So my bet is that when you do send the kill signal, that hook is executing before the one to stop the server, and hence, any attempt to use the cache manager notifier to remove the listener fails. Why does GlobalComponentRegistry have a shutdown hook though? It's not something that's runnable standalone...

> DefaultCacheManager.removeListener throwing NPE when server stopped
> -------------------------------------------------------------------
>
>                 Key: ISPN-779
>                 URL: https://jira.jboss.org/browse/ISPN-779
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Cache Server
>            Reporter: Galder Zamarreño
>            Assignee: Galder Zamarreño
>             Fix For: 4.2.0.CR1
>
>
> I'm seeing a NPE when Memcached server shutdowns:
> Exception in thread "Thread-2" java.lang.RuntimeException: Exception encountered in shutting down the server
> 	at org.infinispan.server.core.ShutdownHook.run(Main.scala:239)
> Caused by: java.util.concurrent.ExecutionException: org.infinispan.CacheException: Unable to invoke method private void org.infinispan.transaction.xa.TransactionTable.stop() on object 
> 	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
> 	at java.util.concurrent.FutureTask.get(FutureTask.java:83)
> 	at org.infinispan.server.core.ShutdownHook.run(Main.scala:235)
> Caused by: org.infinispan.CacheException: Unable to invoke method private void org.infinispan.transaction.xa.TransactionTable.stop() on object 
> 	at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:173)
> 	at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:861)
> 	at org.infinispan.factories.AbstractComponentRegistry.internalStop(AbstractComponentRegistry.java:709)
> 	at org.infinispan.factories.AbstractComponentRegistry.stop(AbstractComponentRegistry.java:603)
> 	at org.infinispan.factories.ComponentRegistry.stop(ComponentRegistry.java:166)
> 	at org.infinispan.CacheDelegate.stop(CacheDelegate.java:325)
> 	at org.infinispan.manager.DefaultCacheManager.stop(DefaultCacheManager.java:521)
> 	at org.infinispan.server.core.ShutdownHook$$anon$5.call(Main.scala:230)
> 	at org.infinispan.server.core.ShutdownHook$$anon$5.call(Main.scala:226)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:680)
> Caused by: java.lang.reflect.InvocationTargetException
> 	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:597)
> 	at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:170)
> 	... 13 more
> Caused by: java.lang.NullPointerException
> 	at org.infinispan.manager.DefaultCacheManager.removeListener(DefaultCacheManager.java:541)
> 	at org.infinispan.transaction.xa.TransactionTable.stop(TransactionTable.java:87)
> 	... 18 more
> The origin seems to be in ISPN-771
> Maybe since transaction table now removes the listener, it needs to stop *before* the cache manager notifier does? 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the infinispan-issues mailing list