0 Replies Latest reply on Nov 22, 2006 4:27 AM by Vishal K

    [TreeCache] replication failure with method_call prepare(Glo

    Vishal K Newbie

      I am trying to do a Buddy Replication.
      I have three nodes cluster

      Node 1 Node 2 node 3

      My application works fine.

      But when I stop node1 and continue using the application, but as soon as I click to add some
      values to some cached object (my application is a Shopping cart app and stores some
      values in session). I get a null pointer exception. Note sure why.

      As soon I get NullPointerException,

      Node 2 console shows the following message :-

      14:43:37,823 INFO [DLQ] Bound to JNDI name: queue/DLQ
      14:44:05,667 INFO [CacheListener] Possible concurrency problem: Replicated version id 1 matches in-memory version for session d
      1oHT5X2tm1nL9Nb3bMA**


      And Node 3 shows:-

      14:43:58,745 ERROR [TxInterceptor] method invocation failed
      java.lang.NullPointerException
      at org.jboss.cache.TreeCache._dataGravitationCleanup(TreeCache.java:5082)
      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:324)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
      at org.jboss.cache.interceptors.CallInterceptor.invoke(CallInterceptor.java:52)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:174)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:34)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.TxInterceptor.replayModifications(TxInterceptor.java:520)
      at org.jboss.cache.interceptors.TxInterceptor.handlePessimisticPrepare(TxInterceptor.java:438)
      at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:304)
      at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:127)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:183)
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5520)
      at org.jboss.cache.TreeCache._replicate(TreeCache.java:4827)
      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:324)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
      at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:220)
      at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:615)
      at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:512)
      at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:326)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUp(MessageDispatcher.java:722)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.access$300(MessageDispatcher.java:554)
      at org.jgroups.blocks.MessageDispatcher$1.run(MessageDispatcher.java:691)
      at java.lang.Thread.run(Thread.java:534)
      14:43:58,745 ERROR [TxInterceptor] prepare method invocation failed
      java.lang.RuntimeException: java.lang.NullPointerException
      at org.jboss.cache.interceptors.TxInterceptor.replayModifications(TxInterceptor.java:533)
      at org.jboss.cache.interceptors.TxInterceptor.handlePessimisticPrepare(TxInterceptor.java:438)
      at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:304)
      at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:127)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:183)
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5520)
      at org.jboss.cache.TreeCache._replicate(TreeCache.java:4827)
      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:324)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
      at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:220)
      at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:615)
      at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:512)
      at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:326)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUp(MessageDispatcher.java:722)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.access$300(MessageDispatcher.java:554)
      at org.jgroups.blocks.MessageDispatcher$1.run(MessageDispatcher.java:691)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.NullPointerException
      at org.jboss.cache.TreeCache._dataGravitationCleanup(TreeCache.java:5082)
      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:324)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
      at org.jboss.cache.interceptors.CallInterceptor.invoke(CallInterceptor.java:52)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:174)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:34)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.TxInterceptor.replayModifications(TxInterceptor.java:520)
      ... 20 more
      14:43:58,745 INFO [TxInterceptor] There was a problem handling this request
      java.lang.RuntimeException: java.lang.NullPointerException
      at org.jboss.cache.interceptors.TxInterceptor.replayModifications(TxInterceptor.java:533)
      at org.jboss.cache.interceptors.TxInterceptor.handlePessimisticPrepare(TxInterceptor.java:438)
      at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:304)
      at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:127)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:183)
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5520)
      at org.jboss.cache.TreeCache._replicate(TreeCache.java:4827)
      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:324)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
      at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:220)
      at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:615)
      at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:512)
      at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:326)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUp(MessageDispatcher.java:722)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.access$300(MessageDispatcher.java:554)
      at org.jgroups.blocks.MessageDispatcher$1.run(MessageDispatcher.java:691)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.NullPointerException
      at org.jboss.cache.TreeCache._dataGravitationCleanup(TreeCache.java:5082)
      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:324)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
      at org.jboss.cache.interceptors.CallInterceptor.invoke(CallInterceptor.java:52)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:174)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:34)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.TxInterceptor.replayModifications(TxInterceptor.java:520)
      ... 20 more
      14:43:58,760 WARN [TreeCache] replication failure with method_call prepare(GlobalTransaction:<www:7811>:1, [_put(GlobalTransact
      n:<www:7811>:1, /_BUDDY_BACKUP_/www_7811/JSESSION/localhost/OnlineShopping/dhw1oHT5X2tm1nL9Nb3bMA**, {VERSION=7, dhw1oHT5X2tm1nL
      b3bMA**=[B@10d78ec}, true), _dataGravitationCleanup(GlobalTransaction:<www:7811>:1, /JSESSION/localhost/OnlineShopping/dhw1oHT5X
      m1nL9Nb3bMA**, /_BUDDY_BACKUP_/www_7810/JSESSION/localhost/OnlineShopping/dhw1oHT5X2tm1nL9Nb3bMA**)], www:7811, true) exception:
      ava.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
      14:43:58,760 ERROR [RpcDispatcher] failed invoking method
      java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5526)
      at org.jboss.cache.TreeCache._replicate(TreeCache.java:4827)
      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:324)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
      at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:220)
      at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:615)
      at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:512)
      at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:326)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUp(MessageDispatcher.java:722)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.access$300(MessageDispatcher.java:554)
      at org.jgroups.blocks.MessageDispatcher$1.run(MessageDispatcher.java:691)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.RuntimeException: java.lang.NullPointerException
      at org.jboss.cache.interceptors.TxInterceptor.replayModifications(TxInterceptor.java:533)
      at org.jboss.cache.interceptors.TxInterceptor.handlePessimisticPrepare(TxInterceptor.java:438)
      at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:304)
      at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:127)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:183)
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5520)
      ... 14 more
      Caused by: java.lang.NullPointerException
      at org.jboss.cache.TreeCache._dataGravitationCleanup(TreeCache.java:5082)
      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:324)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:236)
      at org.jboss.cache.interceptors.CallInterceptor.invoke(CallInterceptor.java:52)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:174)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:34)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
      at org.jboss.cache.interceptors.TxInterceptor.replayModifications(TxInterceptor.java:520)
      ... 20 more
      14:44:05,620 WARN [RequestProcessor] Unhandled Exception thrown: class java.lang.NullPointerException
      14:44:05,635 ERROR [[action]] Servlet.service() for servlet action threw exception
      java.lang.NullPointerException
      at com.shoppingcart.ViewCartAction.addItem(Unknown Source)
      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:324)
      at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
      at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:87)
      at org.jboss.web.tomcat.tc5.session.JvmRouteValve.invoke(JvmRouteValve.java:84)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:534)


      what is this TreeCache Exception?