During the migration to Java 21, we also migrated to Spring Batch 5. The default serialization behavior for ExecutionContexts was changed in this version, and the new serializer was not able to handle some of the model classes we were using. This resulted in a NotSerializableException being thrown during the CVR requeue step when there were samples that failed to requeue.
Solution
This PR changes the Spring configuration to use the JacksonExecutionContextStringSerializer, which behaves the same as the pre-Spring Batch 5 serializer and avoids this error.
Issue
Pre-import errors from the CVR fetcher
Cause
During the migration to Java 21, we also migrated to Spring Batch 5. The default serialization behavior for ExecutionContexts was changed in this version, and the new serializer was not able to handle some of the model classes we were using. This resulted in a
NotSerializableException
being thrown during the CVR requeue step when there were samples that failed to requeue.Solution
This PR changes the Spring configuration to use the
JacksonExecutionContextStringSerializer
, which behaves the same as the pre-Spring Batch 5 serializer and avoids this error./cc @averyniceday @sheridancbio @mandawilson