# Malformed Content?

**URL:** <https://discuss.elastic.co/t/malformed-content/3751>\
**Category:** Elasticsearch\
**Created:** [January 6, 2011, 8:21pm UTC](https://discuss.elastic.co/t/malformed-content/3751 "2011-01-06T20:21:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bailey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bailey/32/3278_2.png) [@bailey](https://discuss.elastic.co/u/bailey)\
**Post date:** [January 6, 2011, 8:21pm UTC](https://discuss.elastic.co/t/malformed-content/3751/1 "2011-01-06T20:21:44Z")

</div>

Hi All-

I'm receiving a malformed content exception that I think is being  
triggered by putting an empty json object ( {} ) into storage.  
This happens with and with out a schema present.  
Is this expected behavior?

Caused by: org.elasticsearch.index.mapper.MapperException: Malformed  
content, after first object, either the type field or the actual  
properties should exist  
at  
org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper.parse(XContentDocumentMapper.java:  
367)  
at  
org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper.parse(XContentDocumentMapper.java:  
344)  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:  
233)  
at  
org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:  
166)  
at  
org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:  
66)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction  
$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:  
418)  
... 5 more

Thanks!

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [January 7, 2011, 1:45pm UTC](https://discuss.elastic.co/t/malformed-content/3751/2 "2011-01-07T13:45:30Z")

</div>

Yep.

On Thu, Jan 6, 2011 at 10:21 PM, bailey [matt.bailey@gmail.com](mailto:matt.bailey@gmail.com) wrote:

> Hi All-
> 
> I'm receiving a malformed content exception that I think is being  
> triggered by putting an empty json object ( {} ) into storage.  
> This happens with and with out a schema present.  
> Is this expected behavior?
> 
> Caused by: org.elasticsearch.index.mapper.MapperException: Malformed  
> content, after first object, either the type field or the actual  
> properties should exist  
> at
> 
> org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper.parse(XContentDocumentMapper.java:  
> 367)  
> at
> 
> org.elasticsearch.index.mapper.xcontent.XContentDocumentMapper.parse(XContentDocumentMapper.java:  
> 344)  
> at
> 
> org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:  
> 233)  
> at
> 
> org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:  
> 166)  
> at
> 
> org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:  
> 66)  
> at
> 
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction
> 
> $AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:  
> 418)  
> ... 5 more
> 
> Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:14am UTC](https://discuss.elastic.co/t/malformed-content/3751/3 "2017-07-06T04:14:09Z")

</div>


