org.springframework.http.converter.HttpMessageNotWritableException

tip

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

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

  • 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["applicationConfig: [classpath:/application.groovy]#development"]->java.util.LinkedHashMap["a"]->_run_closure1["delegate"]->script14676936485701338056614["binding"]->groovy.util.ConfigBinding["callable"]->groovy.util._parse_closure6["delegate"]->groovy.util.ConfigSlurper["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["applicationConfig: [classpath:/application.groovy]#development"]->java.util.LinkedHashMap["a"]->_run_closure1["delegate"]->script14676936485701338056614["binding"]->groovy.util.ConfigBinding["callable"]->groovy.util._parse_closure6["delegate"]->groovy.util.ConfigSlurper["classLoader"]->groovy.lang.GroovyClassLoader["resourceLoader"]) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_51] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_51] 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["applicationConfig: [classpath:/application.groovy]#development"]->java.util.LinkedHashMap["a"]->_run_closure1["delegate"]->script14676936485701338056614["binding"]->groovy.util.ConfigBinding["callable"]->groovy.util._parse_closure6["delegate"]->groovy.util.ConfigSlurper["classLoader"]->groovy.lang.GroovyClassLoader["resourceLoader"]) at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:59)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:26)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:491)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:412)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:27)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:491)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:412)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:27)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:128)[jackson-databind-2.4.6.jar:2.4.6] at com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:1902)[jackson-databind-2.4.6.jar:2.4.6] ... 3 more

Users with the same issue

Unknown visitor1 times, last one,
Unknown visitor1 times, last one,
Unknown visitor1 times, last one,
Unknown visitor1 times, last one,
Unknown visitor1 times, last one,
22 more bugmates