Hi,
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...Code:Caused by: java.lang.NullPointerException at org.springframework.batch.item.database.JpaPagingItemReader.doClose(JpaPagingItemReader.java:140) at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.close(AbstractItemCountingItemStreamItemReader.java:98) ... 42 more
Thanks,
Bruno


) 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.
Reply With Quote