# Getting org.elasticsearch.common.jackson.JsonParseException?

**URL:** https://discuss.elastic.co/t/getting-org-elasticsearch-common-jackson-jsonparseexception/6296
**Category:** Elasticsearch
**Created:** [January 6, 2012, 6:59am UTC](https://discuss.elastic.co/t/getting-org-elasticsearch-common-jackson-jsonparseexception/6296 "2012-01-06T06:59:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)
#### Post date: [January 6, 2012, 6:59am UTC](https://discuss.elastic.co/t/getting-org-elasticsearch-common-jackson-jsonparseexception/6296/1 "2012-01-06T06:59:57Z")

</div>

Hi

I am using following bulk message format for creating index using  
rabbitmq river.

{"index" : { "\_index" : "test", "\_type" : "type1", "\_id" : "1"  
"\_analyzer"="myanalyzer" } }  
{ "type1" : { "field1" : "abc" } }  
{ "myanalyzer" : {"type" : "custom", "tokenizer" :  
"standard","filter" : {"asciifolding","stop":{"stopwords":  
{"stop1","stop2"}},"length":{"min":"0","max":"2000"},"snowball",  
"standard", "lowercase"}}}  
{"create" : { "\_index" : "test", "\_type" : "type1", "\_id" : "1" } }  
{ "type1" : { "field1" : "abc" } }

Here i'm try to override the default analyzer with my custom  
analyzer,but i got the following exception:

org.elasticsearch.common.jackson.JsonParseException: Unexpected  
character ('"' (code 34)): was expecting comma to separate OBJECT  
entries  
at [Source: [B@157f3a4; line: 1, column: 65]  
at  
org.elasticsearch.common.jackson.JsonParser.\_constructError(JsonParser.java:  
1291)  
at  
org.elasticsearch.common.jackson.impl.JsonParserMinimalBase.\_reportError(JsonParserMinimalBase.java:  
385)  
at  
org.elasticsearch.common.jackson.impl.JsonParserMinimalBase.\_reportUnexpectedChar(JsonParserMinimalBase.java:  
306)  
at  
org.elasticsearch.common.jackson.impl.Utf8StreamParser.nextToken(Utf8StreamParser.java:  
312)  
at  
org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:  
46)  
at org.elasticsearch.action.bulk.BulkRequest.add(BulkRequest.java:  
121)  
at  
org.elasticsearch.client.action.bulk.BulkRequestBuilder.add(BulkRequestBuilder.java:  
84)  
at org.elasticsearch.river.rabbitmq.RabbitmqRiver  
$Consumer.run(RabbitmqRiver.java:216)  
at java.lang.Thread.run(Thread.java:662)

please help me and point out where the problem and what will be the  
correct mapping for override the default analyzer.

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 6, 2012, 11:29am UTC](https://discuss.elastic.co/t/getting-org-elasticsearch-common-jackson-jsonparseexception/6296/2 "2012-01-06T11:29:19Z")

</div>

Can't help you since you past teh bulk message in the mail, and it looses  
formatting which is important, gist it.

On Fri, Jan 6, 2012 at 8:59 AM, sam [mishra.sameek@gmail.com](mailto:mishra.sameek@gmail.com) wrote:

> Hi
> 
> I am using following bulk message format for creating index using  
> rabbitmq river.
> 
> {"index" : { "\_index" : "test", "\_type" : "type1", "\_id" : "1"  
> "\_analyzer"="myanalyzer" } }  
> { "type1" : { "field1" : "abc" } }  
> { "myanalyzer" : {"type" : "custom", "tokenizer" :  
> "standard","filter" : {"asciifolding","stop":{"stopwords":  
> {"stop1","stop2"}},"length":{"min":"0","max":"2000"},"snowball",  
> "standard", "lowercase"}}}  
> {"create" : { "\_index" : "test", "\_type" : "type1", "\_id" : "1" } }  
> { "type1" : { "field1" : "abc" } }
> 
> Here i'm try to override the default analyzer with my custom  
> analyzer,but i got the following exception:
> 
> org.elasticsearch.common.jackson.JsonParseException: Unexpected  
> character ('"' (code 34)): was expecting comma to separate OBJECT  
> entries  
> at [Source: [B@157f3a4; line: 1, column: 65]  
> at
> 
> org.elasticsearch.common.jackson.JsonParser.\_constructError(JsonParser.java:  
> 1291)  
> at
> 
> org.elasticsearch.common.jackson.impl.JsonParserMinimalBase.\_reportError(JsonParserMinimalBase.java:  
> 385)  
> at
> 
> org.elasticsearch.common.jackson.impl.JsonParserMinimalBase.\_reportUnexpectedChar(JsonParserMinimalBase.java:  
> 306)  
> at
> 
> org.elasticsearch.common.jackson.impl.Utf8StreamParser.nextToken(Utf8StreamParser.java:  
> 312)  
> at
> 
> org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:  
> 46)  
> at org.elasticsearch.action.bulk.BulkRequest.add(BulkRequest.java:  
> 121)  
> at
> 
> org.elasticsearch.client.action.bulk.BulkRequestBuilder.add(BulkRequestBuilder.java:  
> 84)  
> at org.elasticsearch.river.rabbitmq.RabbitmqRiver  
> $Consumer.run(RabbitmqRiver.java:216)  
> at java.lang.Thread.run(Thread.java:662)
> 
> please help me and point out where the problem and what will be the  
> correct mapping for override the default analyzer.
> 
> 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, 3:43am UTC](https://discuss.elastic.co/t/getting-org-elasticsearch-common-jackson-jsonparseexception/6296/3 "2017-07-06T03:43:42Z")

</div>


