I recently upgraded my spring boot app from spring 5 to spring 6 along with other dependency jars.
App uses spring integration to consume messages from queue and process it with other downstream systems.
After the upgrade, started seeing below error -
Caused by: org.springframework.expression.spel.**SpelEvaluationException**: **EL1078E: Concatenated string is too long, exceeding the threshold of '100,000' characters** at org.springframework.expression.spel.ast.OpPlus.checkStringLength(OpPlus.java:158)
From the error it seems, spring integration is not able to take message larger the 100k characters length, app was able to consume these size messages before version upgrade.
I did try to find out this limit length and looks like it is hard coded in spring -
Does anyone know if there is any other way to fix this error ?
I don't see that there is such a property to configure that limit. It is really hard-codded in the OpPlus
. The problem is not upgrade of Java version, but rather you have upgraded Spring Framework from some old version. See Javadocon that OpPlus.MAX_CONCATENATED_STRING_LENGTH
.
Also, the problem is not with the mentioned <int-jms:message-driven-channel-adapter>
, but rather somewhere downstream where you do such a huge concatenation in SpEL.
Consider to move that logic into Java method call if you really have to do this concatenation.