[jboss-user] [Remoting] - NPE in ServerInvokerCallbackHandler

JeremyStone do-not-reply at jboss.com
Wed Oct 22 10:50:46 EDT 2008

If memory is running short so that handleCallback calls persistCallback (applies to pull-style callbacks - e.g. when connect via http), a NullPointerException can result in persistCallback if the client simultaneously disconnects causing destroy() to be called setting callbackStore to null.

Can easily reproduce this behaviour by stopping the callback thread in the debugger as the client is disconnected (or abruptly killed).

Changing persistCallback to:

   private synchronized void persistCallback(InvocationRequest callback) throws IOException
  |    {
  |       if (callbackStore != null){
  |          callbackStore.add(callback);
  |       }
  |    }

may fix it.

BTW this is in JBoss Remoting 2.2.2.SP8.

Suspect similar to issue raised in http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175262 (which has no replies as yet). Stack trace is the same.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183875#4183875

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183875

More information about the jboss-user mailing list