Col*_*inD 7 java rest spring spring-data-rest
继续使用Spring Data Rest.移动到2.4.0给了我更多我想要的行为,但现在我得到一个奇怪的间歇性异常.
关于...2/3当我重新加载或部署我的应用程序时,每个带有数据的SDR端点都会抛出500,并提供以下内容:
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"])
Run Code Online (Sandbox Code Playgroud)
(提供完整的错误报告:http://pastebin.com/xzzXkFiR)
就像我说的那样,每次重新加载/部署应用程序时都不会发生这种情况,但是如果它发生了它就完全卡住了,重新加载是修复它的唯一方法.非常奇怪的行为,想知道是否有人有任何见解.
如果我回滚到Spring Data Rest 2.3.2,则不会出现问题
感谢您的帮助,请告诉我我可以提供的其他相关信息.
最新问题也发生(2.5.0 SNAPSHOT).
小智 6
更新到Spring Data Rest 2.4.0后,我可以观察到同样的问题.该问题不具有确定性的可重复性.到目前为止,我没有任何统计数据,但在将Jackson依赖项从2.4.0更新到2.6.0之后,它的发生频率较低.有时它仍会弹出,但在我的情况下重新加载就足够了.一个最小的例子将有助于深入了解它.
Jackson-databind 库中的错误。一旦发布,升级以发布列车 Gosling-SR3。
请参阅https://jira.spring.io/browse/DATAREST-716和https://jira.spring.io/browse/DATAREST-743
| 归档时间: |
|
| 查看次数: |
701 次 |
| 最近记录: |