Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackOverflowError when serializing JsonProcessingException #3244

Closed
saneksanek opened this issue Aug 13, 2021 · 8 comments
Closed

StackOverflowError when serializing JsonProcessingException #3244

saneksanek opened this issue Aug 13, 2021 · 8 comments
Milestone

Comments

@saneksanek
Copy link

Describe the bug
I try to validate json with spring and get HttpMessageNotReadableException -> JsonMappingException

Version information
2.12.3

To Reproduce
If you have a way to reproduce this with:

  1. Input json
    {
    "transactionType": "DEPOSIT"
    "operationType": "CREATE"
    }

As you see - comma is absent after "DEPOSIT"

  1. I handle it with native spring @ExceptionHandler(value = {HttpMessageNotReadableException.class})

  2. When I try too look "inside" this exception and just print it as json I get in response

{ "cause": { "cause": null, "stackTrace": [ { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "_constructError", "fileName": "JsonParser.java", "lineNumber": 2337, "className": "com.fasterxml.jackson.core.JsonParser", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "_reportError", "fileName": "ParserMinimalBase.java", "lineNumber": 710, "className": "com.fasterxml.jackson.core.base.ParserMinimalBase", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "_reportUnexpectedChar", "fileName": "ParserMinimalBase.java", "lineNumber": 635, "className": "com.fasterxml.jackson.core.base.ParserMinimalBase", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "nextFieldName", "fileName": "UTF8StreamJsonParser.java", "lineNumber": 1024, "className": "com.fasterxml.jackson.core.json.UTF8StreamJsonParser", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "deserializeFromObject", "fileName": "BeanDeserializer.java", "lineNumber": 409, "className": "com.fasterxml.jackson.databind.deser.BeanDeserializer", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "deserialize", "fileName": "BeanDeserializer.java", "lineNumber": 195, "className": "com.fasterxml.jackson.databind.deser.BeanDeserializer", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "readRootValue", "fileName": "DefaultDeserializationContext.java", "lineNumber": 322, "className": "com.fasterxml.jackson.databind.deser.DefaultDeserializationContext", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "_readMapAndClose", "fileName": "ObjectMapper.java", "lineNumber": 4593, "className": "com.fasterxml.jackson.databind.ObjectMapper", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "readValue", "fileName": "ObjectMapper.java", "lineNumber": 3601, "className": "com.fasterxml.jackson.databind.ObjectMapper", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "readJavaType", "fileName": "AbstractJackson2HttpMessageConverter.java", "lineNumber": 378, "className": "org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "read", "fileName": "AbstractJackson2HttpMessageConverter.java", "lineNumber": 342, "className": "org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "readWithMessageConverters", "fileName": "AbstractMessageConverterMethodArgumentResolver.java", "lineNumber": 185, "className": "org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "readWithMessageConverters", "fileName": "RequestResponseBodyMethodProcessor.java", "lineNumber": 158, "className": "org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "resolveArgument", "fileName": "RequestResponseBodyMethodProcessor.java", "lineNumber": 131, "className": "org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "resolveArgument", "fileName": "HandlerMethodArgumentResolverComposite.java", "lineNumber": 121, "className": "org.springframework.web.method.support.HandlerMethodArgumentResolverComposite", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "getMethodArgumentValues", "fileName": "InvocableHandlerMethod.java", "lineNumber": 170, "className": "org.springframework.web.method.support.InvocableHandlerMethod", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "invokeForRequest", "fileName": "InvocableHandlerMethod.java", "lineNumber": 137, "className": "org.springframework.web.method.support.InvocableHandlerMethod", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "invokeAndHandle", "fileName": "ServletInvocableHandlerMethod.java", "lineNumber": 106, "className": "org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "invokeHandlerMethod", "fileName": "RequestMappingHandlerAdapter.java", "lineNumber": 894, "className": "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "handleInternal", "fileName": "RequestMappingHandlerAdapter.java", "lineNumber": 808, "className": "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "handle", "fileName": "AbstractHandlerMethodAdapter.java", "lineNumber": 87, "className": "org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doDispatch", "fileName": "DispatcherServlet.java", "lineNumber": 1063, "className": "org.springframework.web.servlet.DispatcherServlet", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doService", "fileName": "DispatcherServlet.java", "lineNumber": 963, "className": "org.springframework.web.servlet.DispatcherServlet", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "processRequest", "fileName": "FrameworkServlet.java", "lineNumber": 1006, "className": "org.springframework.web.servlet.FrameworkServlet", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doPost", "fileName": "FrameworkServlet.java", "lineNumber": 909, "className": "org.springframework.web.servlet.FrameworkServlet", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "service", "fileName": "HttpServlet.java", "lineNumber": 681, "className": "javax.servlet.http.HttpServlet", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "service", "fileName": "FrameworkServlet.java", "lineNumber": 883, "className": "org.springframework.web.servlet.FrameworkServlet", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "service", "fileName": "HttpServlet.java", "lineNumber": 764, "className": "javax.servlet.http.HttpServlet", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "internalDoFilter", "fileName": "ApplicationFilterChain.java", "lineNumber": 228, "className": "org.apache.catalina.core.ApplicationFilterChain", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilter", "fileName": "ApplicationFilterChain.java", "lineNumber": 163, "className": "org.apache.catalina.core.ApplicationFilterChain", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilter", "fileName": "WsFilter.java", "lineNumber": 53, "className": "org.apache.tomcat.websocket.server.WsFilter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "internalDoFilter", "fileName": "ApplicationFilterChain.java", "lineNumber": 190, "className": "org.apache.catalina.core.ApplicationFilterChain", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilter", "fileName": "ApplicationFilterChain.java", "lineNumber": 163, "className": "org.apache.catalina.core.ApplicationFilterChain", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilterInternal", "fileName": "RequestContextFilter.java", "lineNumber": 100, "className": "org.springframework.web.filter.RequestContextFilter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilter", "fileName": "OncePerRequestFilter.java", "lineNumber": 119, "className": "org.springframework.web.filter.OncePerRequestFilter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "internalDoFilter", "fileName": "ApplicationFilterChain.java", "lineNumber": 190, "className": "org.apache.catalina.core.ApplicationFilterChain", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilter", "fileName": "ApplicationFilterChain.java", "lineNumber": 163, "className": "org.apache.catalina.core.ApplicationFilterChain", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilterInternal", "fileName": "FormContentFilter.java", "lineNumber": 93, "className": "org.springframework.web.filter.FormContentFilter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilter", "fileName": "OncePerRequestFilter.java", "lineNumber": 119, "className": "org.springframework.web.filter.OncePerRequestFilter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "internalDoFilter", "fileName": "ApplicationFilterChain.java", "lineNumber": 190, "className": "org.apache.catalina.core.ApplicationFilterChain", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilter", "fileName": "ApplicationFilterChain.java", "lineNumber": 163, "className": "org.apache.catalina.core.ApplicationFilterChain", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilterInternal", "fileName": "CharacterEncodingFilter.java", "lineNumber": 201, "className": "org.springframework.web.filter.CharacterEncodingFilter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilter", "fileName": "OncePerRequestFilter.java", "lineNumber": 119, "className": "org.springframework.web.filter.OncePerRequestFilter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "internalDoFilter", "fileName": "ApplicationFilterChain.java", "lineNumber": 190, "className": "org.apache.catalina.core.ApplicationFilterChain", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doFilter", "fileName": "ApplicationFilterChain.java", "lineNumber": 163, "className": "org.apache.catalina.core.ApplicationFilterChain", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "invoke", "fileName": "StandardWrapperValve.java", "lineNumber": 202, "className": "org.apache.catalina.core.StandardWrapperValve", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "invoke", "fileName": "StandardContextValve.java", "lineNumber": 97, "className": "org.apache.catalina.core.StandardContextValve", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "invoke", "fileName": "AuthenticatorBase.java", "lineNumber": 542, "className": "org.apache.catalina.authenticator.AuthenticatorBase", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "invoke", "fileName": "StandardHostValve.java", "lineNumber": 143, "className": "org.apache.catalina.core.StandardHostValve", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "invoke", "fileName": "ErrorReportValve.java", "lineNumber": 92, "className": "org.apache.catalina.valves.ErrorReportValve", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "invoke", "fileName": "StandardEngineValve.java", "lineNumber": 78, "className": "org.apache.catalina.core.StandardEngineValve", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "service", "fileName": "CoyoteAdapter.java", "lineNumber": 357, "className": "org.apache.catalina.connector.CoyoteAdapter", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "service", "fileName": "Http11Processor.java", "lineNumber": 382, "className": "org.apache.coyote.http11.Http11Processor", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "process", "fileName": "AbstractProcessorLight.java", "lineNumber": 65, "className": "org.apache.coyote.AbstractProcessorLight", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "process", "fileName": "AbstractProtocol.java", "lineNumber": 893, "className": "org.apache.coyote.AbstractProtocol$ConnectionHandler", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "doRun", "fileName": "NioEndpoint.java", "lineNumber": 1723, "className": "org.apache.tomcat.util.net.NioEndpoint$SocketProcessor", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "run", "fileName": "SocketProcessorBase.java", "lineNumber": 49, "className": "org.apache.tomcat.util.net.SocketProcessorBase", "nativeMethod": false }, { "classLoaderName": null, "moduleName": "java.base", "moduleVersion": "11.0.10", "methodName": "runWorker", "fileName": "ThreadPoolExecutor.java", "lineNumber": 1128, "className": "java.util.concurrent.ThreadPoolExecutor", "nativeMethod": false }, { "classLoaderName": null, "moduleName": "java.base", "moduleVersion": "11.0.10", "methodName": "run", "fileName": "ThreadPoolExecutor.java", "lineNumber": 628, "className": "java.util.concurrent.ThreadPoolExecutor$Worker", "nativeMethod": false }, { "classLoaderName": "app", "moduleName": null, "moduleVersion": null, "methodName": "run", "fileName": "TaskThread.java", "lineNumber": 61, "className": "org.apache.tomcat.util.threads.TaskThread$WrappingRunnable", "nativeMethod": false }, { "classLoaderName": null, "moduleName": "java.base", "moduleVersion": "11.0.10", "methodName": "run", "fileName": "Thread.java", "lineNumber": 834, "className": "java.lang.Thread", "nativeMethod": false } ], "message": "Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: (PushbackInputStream); line: 4, column: 6]", "processor": { "valueAsString": "", "text": "", "textLength": 0, "inputSource": null, "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory": { "codec": { "factory" : {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": { "codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory" : {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": { "codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory" : {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": { "codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory" : {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": { "codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": {"codec":{"factory": {"codec": {"factory": {"codec": {"factory": {"codec": {"factory" : {"codec": {"factory": {"codec": {"factory": {"codec": {"factory": { "codec": {"factory": {"codec": {"factory" : {"codec": {"factory": {"codec":{ } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} }

And in logs

org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite recursion (StackOverflowError); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.fasterxml.jackson.databind.ObjectMapper["factory"] etc

Expected behavior
If reproduction itself needs further explanation, you may also add more details here.

Additional context
Add any other context about the problem here.

@saneksanek saneksanek added the to-evaluate Issue that has been received but not yet evaluated label Aug 13, 2021
@yawkat
Copy link
Member

yawkat commented Aug 13, 2021

it looks like youre attempting to serialize the exception to json. This is probably not what you want

@saneksanek
Copy link
Author

Yes, I don't need it. I've just noticed that it went wrong. :)

@cowtowncoder
Copy link
Member

Unfortunately the problem here is the cyclic data structure; I am not sure there is much Jackson can do on its own.
There are ways to handle cyclic structures; either by suppressing properties that lead to cycles, or using @JsonIdentityInfo to use Object Ids for some types, but there is no general way to avoid this issue.

@cowtowncoder
Copy link
Member

Actually there might be an issue to try to tackle, wrt serialization of Exceptions. But this would require:

  1. Versions of Jackson and JDK used
  2. Reproduction of some kind as this probably depends on type of Exception being serialized

Leaving open if that information could be added.

@yawkat
Copy link
Member

yawkat commented Aug 18, 2021

From the json in the report, it looks like it's just JsonParseException. That has a getProcessor method, and then it goes through JsonParser.getCodec, which has a mutually recursive reference through ObjectMapper.getFactory and JsonFactory.getCodec.

Allowing serialization of exceptions could be dangerous, because stack traces may reveal information about the application. IMO, if a user wants to serialize exceptions, they should define their own format, e.g. through a DTO.

@cowtowncoder
Copy link
Member

@yawkat While there is real information disclosure concern, serialization (and to a degree, deserialization) of Throwables is something Jackson has supported for a long time. So this is an existing feature.
There probably are aspects that should be configurable there, eventually (like whether stack trace information should be included completely, partially, etc).

@cowtowncoder
Copy link
Member

cowtowncoder commented Sep 3, 2021

Huh. Ok, yes, I can reproduce this... Problem must come via getProcessor() method like @yawkat already said.

@cowtowncoder cowtowncoder added 2.13 and removed to-evaluate Issue that has been received but not yet evaluated labels Sep 3, 2021
@cowtowncoder cowtowncoder added this to the 2.13.0 milestone Sep 3, 2021
@cowtowncoder cowtowncoder changed the title StackOverflowError during malformed json parsing StackOverflowError when serializing JsonProcessingException Sep 3, 2021
@cowtowncoder
Copy link
Member

Ok. Fun times! There are multiple ways to tackle this one.

For example: we could prevent serialization of processor altogether. Easiest would be to rename getProcessor() into non-getter method. This is actually being done in Jackson 3.0.
But we can't do that in 2.x for backwards compatibility, just in case someone might be using the method.

So we could remove that property for JacksonException types in BeanSerializerFactory. Possible but bit messy.

Alternatively we could -- and I did -- change serialization of processor types; I made them serialize as empty JSON Objects for now.
There are variations here: could f.ex serialize as JSON String (class name). That might be useful, but if this property is removed from 3.0 it seems better idea not to add more information.

So, for 2.13 I plan on going with changing serialization, and working around the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants