org.springframework.http.converter.HttpMessageNotWritableException

Could not write content: No serializer found for class groovy.lang.GroovyClassLoader$1 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.LinkedHashMap["AuditConfig"]->java.util.LinkedHashMap["grails"]->groovy.util.ConfigObject["plugin"]->groovy.util.ConfigObject["auditLog"]->groovy.util.ConfigObject["actorClosure"]->grails.plugins.orm.auditable.__clinit__closure3["delegate"]->grails.plugins.orm.auditable.AuditLogListener["grailsApplication"]->grails.core.DefaultGrailsApplication["classLoader"]->groovy.lang.GroovyClassLoader["resourceLoader"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class groovy.lang.GroovyClassLoader$1 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.LinkedHashMap["AuditConfig"]->java.util.LinkedHashMap["grails"]->groovy.util.ConfigObject["plugin"]->groovy.util.ConfigObject["auditLog"]->groovy.util.ConfigObject["actorClosure"]->grails.plugins.orm.auditable.__clinit__closure3["delegate"]->grails.plugins.orm.auditable.AuditLogListener["grailsApplication"]->grails.core.DefaultGrailsApplication["classLoader"]->groovy.lang.GroovyClassLoader["resourceLoader"])

Samebug tips1

Specify the order of serializing object field with the @JsonPropertyOrder annotation.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web54

Stack trace

  • org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: No serializer found for class groovy.lang.GroovyClassLoader$1 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.LinkedHashMap["AuditConfig"]->java.util.LinkedHashMap["grails"]->groovy.util.ConfigObject["plugin"]->groovy.util.ConfigObject["auditLog"]->groovy.util.ConfigObject["actorClosure"]->grails.plugins.orm.auditable.__clinit__closure3["delegate"]->grails.plugins.orm.auditable.AuditLogListener["grailsApplication"]->grails.core.DefaultGrailsApplication["classLoader"]->groovy.lang.GroovyClassLoader["resourceLoader"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class groovy.lang.GroovyClassLoader$1 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.LinkedHashMap["AuditConfig"]->java.util.LinkedHashMap["grails"]->groovy.util.ConfigObject["plugin"]->groovy.util.ConfigObject["auditLog"]->groovy.util.ConfigObject["actorClosure"]->grails.plugins.orm.auditable.__clinit__closure3["delegate"]->grails.plugins.orm.auditable.AuditLogListener["grailsApplication"]->grails.core.DefaultGrailsApplication["classLoader"]->groovy.lang.GroovyClassLoader["resourceLoader"]) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class groovy.lang.GroovyClassLoader$1 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.LinkedHashMap["AuditConfig"]->java.util.LinkedHashMap["grails"]->groovy.util.ConfigObject["plugin"]->groovy.util.ConfigObject["auditLog"]->groovy.util.ConfigObject["actorClosure"]->grails.plugins.orm.auditable.__clinit__closure3["delegate"]->grails.plugins.orm.auditable.AuditLogListener["grailsApplication"]->grails.core.DefaultGrailsApplication["classLoader"]->groovy.lang.GroovyClassLoader["resourceLoader"]) at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:69) at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:32) at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675) at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157) at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675) at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157) at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675) at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157) at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693) at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675) at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157) at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:561) at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:469) at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:29) at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:561)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Andreas HäberAndreas Häber
Once,
DunmerDunmer
Once,
Unknown visitor
Unknown visitor2 times, last one
LukaLuka
Once,
Unknown visitor
Unknown visitorOnce,
21 more bugmates