Because of concurrent threads processing to add custom converter at the same time into the existing message converters list,it is leading to the issue "message converters doesn't contain null elements".
Comment From: rstoyanchev
Please provide more details about what you're trying to do and the resulting output/stacktrace. Ideally provide a sample.
Comment From: ilam-natarajan
@hariprasad-tallapalli I might be facing similar sort of issue, wonder if you found any mitigation.
Comment From: hariprasad-tallapalli
We have extended RestTemplate class and creating single ton class. Using this singleton class trying to add custom string converter of utf8 into the existing list of converters. With multiple threads trying to run this at the same time leading to null values in the converters list. If we can create new rest template object everytime then this issue will not occur again even if you try with multiple threads.
Correct me if I am wrong.
On Thu, Nov 12, 2020, 2:54 PM Ilamparithi Natarajan notifications@github.com wrote:
@hariprasad-tallapalli https://github.com/hariprasad-tallapalli I might be facing similar sort of issue, wonder if you found any mitigation.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-framework/issues/26065#issuecomment-725954607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AME7HPPC2S6DK32KHFT3MLTSPOSTBANCNFSM4TQ2ITWA .
Comment From: ilam-natarajan
@hariprasad-tallapalli did you add the custom string converter every time you issue the request, or only once during startup? @bclozel suggested me in gitter to just do it once during startup
Comment From: rstoyanchev
The list of message converters is meant to be initialized once on startup.
Comment From: hariprasad-tallapalli
Only during start up.
On Thu, Nov 12, 2020, 4:31 PM Ilamparithi Natarajan notifications@github.com wrote:
@hariprasad-tallapalli https://github.com/hariprasad-tallapalli did you add the custom string converter every time you issue the request, or only once during startup? @bclozel https://github.com/bclozel suggested me in gitter to just do it once during startup
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-framework/issues/26065#issuecomment-726006787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AME7HPPXZS2FIZ2BYNCKGFTSPO6B5ANCNFSM4TQ2ITWA .