我是Spring MVC框架的新手。我正在嘗試使用Hibernate檢索用戶詳細信息以在我的Spring項目中返回對象。我收到以下錯誤:無法寫入HTTP消息:org.springframework.http.converter.HttpMessageNotWritableException:
WARN : org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver - Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)) (through reference chain: com.ppts.mschef.util.api.ApiResponse["object"]->com.ppts.mschef.model.Mischef["user"]->com.ppts.mschef.model.User_$$_jvstb3_6["handler"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)) (through reference chain: com.ppts.mschef.util.api.ApiResponse["object"]->com.ppts.mschef.model.Mischef["user"]->com.ppts.mschef.model.User_$$_jvstb3_6["handler"])
任何人都可以告訴解決此錯誤?
[在JSON序列懶惰Loadng錯誤]的可能的複製(http://stackoverflow.com/questions/6277439/lazy-loadng-error-in-json-serializer) – soorapadman