Uploaded image for project: 'JBoss Remoting (3+)'
  1. JBoss Remoting (3+)
  2. REM3-377

Use safeClose() in ClientServiceHandle.close()

XMLWordPrintable

      When shutting down the server, this exception gets raised:

      11:33:04,028 INFO  [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested via an OS signal
      11:33:04,032 ERROR [org.jboss.ejb.client] (MSC service thread 1-3) EJBCLIENT000513: Exception occurred when trying to close the transport provider: java.lang.NullPointerException
      	at org.jboss.remoting3.ClientServiceHandle.closeChannel(ClientServiceHandle.java:144)
      	at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.close(RemoteEJBReceiver.java:211)
      	at org.jboss.ejb.protocol.remote.RemoteTransportProvider.close(RemoteTransportProvider.java:89)
      	at org.jboss.ejb.client.EJBClientContext.close(EJBClientContext.java:630)
      	at org.jboss.as.ejb3.remote.EJBClientContextService.stop(EJBClientContextService.java:181)
      	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1795)
      	at org.jboss.msc.service.ServiceControllerImpl$StopTask.execute(ServiceControllerImpl.java:1764)
      	at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
      	at java.lang.Thread.run(Thread.java:748)
      

      The ClientServiceHandle.close() method needs to use safeClose() in case the channel variable has not been initialized, which can happen if the service creation is cancelled or raises an exception.

              dlloyd@redhat.com David Lloyd
              rachmato@redhat.com Richard Achmatowicz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: