OutOfMemoryError caused by nested UnsatisfiedDependencyExceptions [SPR-14607] #19175
The new error logging format of UnsatisfiedDependencyInjection introduced in Spring 4.3 can cause a OutOfMemoryError. When the constructor
is used (for example when a field with an
This makes it more than double the size of the message of the causing exception and causes exponential growth of memory consumption. If the nesting level is high enough the application will crash with an OutOfMemoryError instead of logging the root cause of the context creation failure, which is hardly the goal of the new logging format.
I suggest to change the constructor definition to:
This makes the causing exception message only be included once as nested exception text.
Example project to reproduce error & logoutput is attached.
Affects: 4.3 GA
1 votes, 3 watchers
The text was updated successfully, but these errors were encountered: