You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applications fails with:
Caused by: java.lang.StackOverflowError: null
at org.springframework.core.ResolvableType.hasGenerics(ResolvableType.java:474)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.resolveVariable(AbstractJackson2HttpMessageConverter.java:326)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.resolveVariable(AbstractJackson2HttpMessageConverter.java:332)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.resolveVariable(AbstractJackson2HttpMessageConverter.java:332)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.resolveVariable(AbstractJackson2HttpMessageConverter.java:332)
...
The issue is in line 332. At some point the method resolveVariable faces Object as result of contextType.getSuperType() and falls with StackOverflowError as result for getSuperType() method for Object is Object.
I tried to check what if there is a check for that and method continues further. Looks like it works well.
There is a code below which i added to check what happenes if method passes further after line 332
Gerasimov Gennady opened SPR-14520 and commented
Jackson 2.8.1
Spring 4.3.1.RELEASE
We have a complex hierarchy of classes like
where
Applications fails with:
Caused by: java.lang.StackOverflowError: null
at org.springframework.core.ResolvableType.hasGenerics(ResolvableType.java:474)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.resolveVariable(AbstractJackson2HttpMessageConverter.java:326)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.resolveVariable(AbstractJackson2HttpMessageConverter.java:332)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.resolveVariable(AbstractJackson2HttpMessageConverter.java:332)
at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.resolveVariable(AbstractJackson2HttpMessageConverter.java:332)
...
The issue is in line 332. At some point the method resolveVariable faces Object as result of contextType.getSuperType() and falls with StackOverflowError as result for getSuperType() method for Object is Object.
I tried to check what if there is a check for that and method continues further. Looks like it works well.
There is a code below which i added to check what happenes if method passes further after line 332
I'm not sure that this is a bug, but i do not find any solutions for my case in stackoverflow.com or other similar resources.
Affects: 4.3.1
Attachments:
Issue Links:
Referenced from: commits 7c5050c, e86529e
The text was updated successfully, but these errors were encountered: