I have a test (running spring tests) that for no apparent reason (there has to be one ) has started to throw a NullPointerException when closing the JpaPagingItemReader. The reason appears to be that the EntityManager is null when the reader is invoking the doClose() method.
I am using the last stable release 2.0.1. This is the exception cause:
I have tried with the 2.0.0 version to no avail. I fail to understand what kind of change in my side may have provoked this. How can it be that the EntityManager is null when closing the JpaPagingItemReader? I am not setting it to null myself anywhere...
Caused by: java.lang.NullPointerException
... 42 more