Spring batch version 2.1.5 concurrent issue in BeanWrapperFieldSetMapper class - spring-batch

I am using Spring batch 2.1.5 as it is compatible with Spring 3.0.3 that we are using in our project. We are getting error while executing the batch job "Duplicate match with distance <= 5 found for this property in input keys" and this looks like a concurrency issue with class BeanWrapperFieldSetMapper. I check this thread "http://forum.spring.io/forum/spring-projects/batch/102370-duplicate-match-with-distance-5-found-for-this-property-in-input-keys" that says there is concurrency issue that has resolved in Spring batch 2.1.8.I have tested my code with Spring batch 2.1.8 and I am not getting the concurrency issue and data is persisted correctly. I can not use Spring batch 2.1.8 as it is internally using Spring 3.0.5 version and I don't wanted to have any class loading issue if I upgrade with 2.1.8.
Is there any workaround with Spring batch 2.1.5 to overcome the concurrency issue?
Thanks
Sach

Related

Spring boot admin client: Is there planned date for support Spring boot 3.0?

There is no version of Spring boot admin client for Spring boot 3.0. Is there planned release?
I'm trying to monitor my application in Spring boot 3 with Spring boot admin client.
I would like to say, it is brilliant tool and thanks maintainers for their work!
There are milestone releases, currently there is 3.0.0-M8, see https://github.com/codecentric/spring-boot-admin/releases/tag/3.0.0-M8
Some things still need to get fixed and all dependencies must be supporting Spring Boot 3.0 first. But you can already use the milestone and if there is anything missing/broken please provide feeedback via github issues.

What is the minimum Spring version where KafkaListenerContainers(any kind) are supported?

I recently had to add a Kafka consumer on a legacy app (sitting on Spring 3.2.5) and when I try to put in a CMLC config it doesn't recognize most of the classes.
My only solution was to run a thread that would poll for messages in an infinite loop and process messages. Can anybody tell me what is the minimum Spring version where a Listener implementation is supported or am I doing sth wrong?
EDIT: I do see that min compile dependency is Spring 4.2.6
https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka/1.0.0.RELEASE

How to check spring boot version compatibilty with spring data cosmos db?

I'm struggling to get cosmos db up and running after upgrading spring boot to 2.3.3.
Is there a compatibility chart please ?
Cosmos has support for Spring 2.3.x. There is a helpful getting started guide on the Spring data readme on GitHub that may point to your issue.
https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos

Evaluation context not correctly set for #Document in Spring 5.x / Spring boot 2.1.6

I am writing a Spring boot application with latest Spring boot 2.1.6 release. There was an issue earlier, which has been discussed both on SO as well as Spring's bug tracker where the Spring EL context did not have access to beans.
This was supposed to have been resolved in Spring 4.x releases. However, I am facing the same problem
References:
SO thread 1
SO thread 2
Spring Data Bug 1043
Spring Data Bug 525
Spring Data Bug 1874
I have tried most of the solutions that were suggested before the actual fix was put in as well.
Right now my code has the annotation like this -
#Document("#{mongoCollectionNameResolver.getCollectionName('BANK')}")
//#Document("BANK")
public class Bank {
}
I have verified that the bean is getting correctly created with the name mentioned in the expression.
I just wanted to ask the community if I am supposed to do anything more for Spring 5.x that I am missing before I reopen the bug / open a new bug with Spring data mongo
When referring to beans with names from SpEL they need to be prefixed # (see the Spring Reference Guide). That being said this means your SpEL expression is wrong.
It should be #{#mongoCollectionNameResolver.getCollectionName('BANK')}.

Configuring Spring Cloud Stream in Camden.SR5 with Spring boot 1.5.1

First off, thanks to the Spring team for all their work pushing this work forward!
Now that Camden.SR5 is official, I have some questions on how to correctly configure the spring cloud stream kafka binder when using Spring Boot 1.5.1.
Spring boot 1.5.1 has auto configuration for kafka and those configuration options seem to be redundant with those in the spring cloud stream kafka binder.
Do we use the core spring boot properties (spring.kafka.) or do we use (spring.cloud.stream.kafka.binder.)?
I did find this issue, but I am curious if this work will be included in the next Camden release?
https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/73
Additionally, I saw this issue reported on Stack Overflow and I believe it will also be an issue with Camden.SR5?
Failed to start bean 'inputBindingLifecycle' when using spring-boot:1.5.1 and spring-cloud-stream
Thanks
Supporting the Boot 1.5 configuration options is an issue in progress. Also, since dedicated 1.5 support is coming only with Spring Cloud Stream Chelsea release train (which is included in the Dalston release of Spring Cloud), it will be available only there.
Also, when using Spring Cloud Camden with Boot 1.5 you will need to override the Kafka dependencies as described in Failed to start bean 'inputBindingLifecycle' when using spring-boot:1.5.1 and spring-cloud-stream. This will be avoided in future versions of Spring Cloud Stream (and Spring Cloud) but only starting in the Chelsea release train of Spring Cloud Stream (and the Dalston release of Spring Cloud) - see https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/88 for details.