With the latest Hopper-SR2 I get the following error:
2016-07-30 15:50:16,189 [main] WARN : Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: PersistentEntity must not be null! (through reference chain: org.springframework.data.rest.webmvc.json.["content"]->com.nemesis.platform.module.cms.core.entity.ListerPageEntity["title"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: PersistentEntity must not be null! (through reference chain: org.springframework.data.rest.webmvc.json.["content"]->com.nemesis.platform.module.cms.core.entity.ListerPageEntity["title"])
My entity has a Map<Locale, LocalizedValue> where LocalizedValue is @Embedable and in my case entity is null because in PersistentEntityJackson2Module you look it up like this
I tried the changed PersistentEntityJackson2Module with Spring Data Hopper SR2 and it solved my serialization problem (a Map<Date, @Embeddable>) as well
Petar Tahchiev opened DATAREST-864 and commented
With the latest
Hopper-SR2
I get the following error:My entity has a
Map<Locale, LocalizedValue>
whereLocalizedValue
is@Embedable
and in my case entity is null because inPersistentEntityJackson2Module
you look it up like thisbut value is a
Map
sovalue.getClass()
returnsPersistentMap
.Sounds like you need a dedicated clause for
Maps
inNestedEntitySerializer.serialize(…)
.Affects: 2.5.2 (Hopper SR2)
Referenced from: pull request #219
Backported to: 2.5.3 (Hopper SR3)
3 votes, 3 watchers
The text was updated successfully, but these errors were encountered: