Working with Spring Data retention continues. Switching to 2.4.0 has given me more of the behavior I want, however now I get a weird intermittent exception.
A., 2/3 of the time when I restart or deploy my application, each data SDR endpoint throws 500 and gives the following:
GET /api/departments -------------------- HTTP Status 500 - Could not write content: org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module$ProjectionResourceContentSerializer cannot be cast to com.fasterxml.jackson.databind.ser.impl.UnwrappingBeanSerializer (through reference chain: org.springframework.hateoas.PagedResources["_embedded"] ->java.util.UnmodifiableMap["departments"] ->java.util.ArrayList[0] ->org.springframework.data.rest.webmvc.json.ProjectionResource["content"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: org.springframework.data.rest.webmvc.json.PersistentEntityJackson2Module$ProjectionResourceContentSerializer cannot be cast to com.fasterxml.jackson.databind.ser.impl.UnwrappingBeanSerializer (through reference chain: org.springframework.hateoas.PagedResources["_embedded"] ->java.util.UnmodifiableMap["departments"] ->java.util.ArrayList[0] ->org.springframework.data.rest.webmvc.json.ProjectionResource["content"])
(Full error report available: http://pastebin.com/xzzXkFiR )
As I said, this does not happen every time I restart / deploy the application, but if it does, it completely gets stuck and rebooting is the only way to fix it. Very weird behavior, wondering if anyone has an understanding.
The problem does not occur if I return to Spring Data Rest 2.3.2
Thanks for the help, and please let me know what other relevant information I can provide.
- SDR: 2.4.1
- SFW: 4.2.1
- SDJPA: 1.9.0
Some additional tests
The problem also arises with the latest (2.5.0 SNAPSHOT).
source share