Closed
Description
So we can address your issue, please include the following:
Version of MarkLogic Java Client API
5.3.0
Version of MarkLogic Server
10.0-4.x and 10.0-5
Java version
Doesn't matter
OS and version
Doesn't matter
Input: Some code to illustrate the problem, preferably in a state that can be independently reproduced on our end
Create an ErrorListener that returns STOP_ALL_CALLS as its disposition, and attach it to a BulkInputCaller which runs with a single thread (i.e. single CallContext). Write a record using that will throw an exception, thus triggering the ErrorListener. It will get a null-pointer on line 238 in InputOutputEndpointImpl:
case STOP_ALL_CALLS:
getCallerThreadPoolExecutor().shutdown();
``
The thread pool executor is null since there's only one thread, so the call to shutdown throws the NPE.
Expectation is that this shouldn't fail if the thread count is one - seems the logic should just say - if there's no thread pool executor, then no need to call shutdown on it.