As the error message indicates, at line 10, you have a comma after "type" : "test",
and before a closing "}", which is invalid JSON syntax. Jörg On Sun, Aug 3, 2014 at 3:14 AM, mithril <[email protected]> wrote: > There is a error seems be the key. > > > >> [2014-08-03 09:10:57,791][DEBUG][action.index ] [Amina Synge] >>> [_river][0], node[95_1PcghS5aXgd3PQqqBFA], [P] >>> , s[STARTED]: Failed to execute [index {[_river][my_jdbc_river][_meta], >>> source[{ >>> "type" : "jdbc", >>> "jdbc" : { >>> "url" : "jdbc:mysql://127.0.0.1:3306/test", >>> "user" : "root", >>> "password" : "123123", >>> "sql" : "select id as _id from documents", >>> "index" : "test", >>> "type" : "test", >>> } >>> } >>> ]}] >>> org.elasticsearch.index.mapper.MapperParsingException: failed to parse >>> at >>> org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:536) >>> at >>> org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:462) >>> at >>> org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:394) >>> at >>> org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:194) >>> at >>> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationActi >>> on.performOnPrimary(TransportShardReplicationOperationAction.java:534) >>> at >>> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationActi >>> on$1.run(TransportShardReplicationOperationAction.java:433) >>> at >>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >>> at >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >>> at java.lang.Thread.run(Thread.java:744) >>> Caused by: org.elasticsearch.common.jackson.core.JsonParseException: >>> Unexpected character ('}' (code 125)): was expectin >>> g either valid name character (for unquoted name) or double-quote (for >>> quoted) to start field name >>> at [Source: [B@3f0cb9e7; line: 10, column: 6] >>> at >>> org.elasticsearch.common.jackson.core.JsonParser._constructError(JsonParser.java:1524) >>> at >>> org.elasticsearch.common.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:557) >>> at >>> org.elasticsearch.common.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:475 >>> ) >>> at >>> org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser._handleOddName(UTF8StreamJsonParser.java:1792 >>> ) >>> at >>> org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser._parseName(UTF8StreamJsonParser.java:1480) >>> at >>> org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:700) >>> at >>> org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:50) >>> at >>> org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:492) >>> at >>> org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:538) >>> at >>> org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:480) >>> at >>> org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:515) >>> ... 8 more >>> >>> -- > You received this message because you are subscribed to the Google Groups > "elasticsearch" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/d1d2610c-da58-41e5-abc0-f84aede089fd%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/d1d2610c-da58-41e5-abc0-f84aede089fd%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF-qm1Dfd9zrHntd92tp_gRCoKjhEtwckxynRDNwOe%2BWw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
