The error message is telling you that you cannot call releaseExternalResources from a thread managed by an executor which, in itself, is managed by releaseExternalResources. It results in a deadlock because releaseExternalResources is trying to shutdown the executor which won't return until the thread that has called releaseExternalResources returns (which it can't).
I would guess that you're calling releaseExternalResources from a thread managed by the executor passed to OioClientSocketChannelFactory, possibly from within a handler. This won't work. You need to call it from a completely separate thread. One option is to block your main application thread until you're ready to shutdown, signal the application thread and have it call releaseExternalResources just before your application exits.