-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
has: backportsLegacy label from JIRA. Superseded by "for: backport-to-x.x.x"Legacy label from JIRA. Superseded by "for: backport-to-x.x.x"in: infrastructuretype: bug
Milestone
Description
When the constructor of JsonItemReader is called directly and open(ExectionConext)
is called, it makes exceptions at ExecutionContextUserSupport.getKey(..)
JsonItemReader<AccessLog> reader = new JsonItemReader<AccessLog>(resource, jsonObjectReader);
reader.open(new ExecutionContext());
AccessLog item = reader.read();
reader.close();
java.lang.IllegalArgumentException: Name must be assigned for the sake of defining the execution context keys prefix.
at org.springframework.util.Assert.hasText(Assert.java:284)
at org.springframework.batch.item.util.ExecutionContextUserSupport.getKey(ExecutionContextUserSupport.java:62)
at org.springframework.batch.item.ItemStreamSupport.getExecutionContextKey(ItemStreamSupport.java:71)
at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.open(AbstractItemCountingItemStreamItemReader.java:159)
The constructor of JsonItemReader should call setExecutionContextName(String)
similar to JsonFileItemWriter.java#L71
weduls
Metadata
Metadata
Assignees
Labels
has: backportsLegacy label from JIRA. Superseded by "for: backport-to-x.x.x"Legacy label from JIRA. Superseded by "for: backport-to-x.x.x"in: infrastructuretype: bug