My JDBC River is not running when I try to use structured objects. The see
my River below, I have basic person index and type, with id fields,
firstName, and emails columns. The emails are 1 to many. When I limit the
query to only people that have 1 email address, it works.
[mynode] [_river] update_mapping [person_river] (dynamic)
[2012-08-29 15:26:16,160][ERROR][org.elasticsearch.river.jdbc] Can not
write a field name, expecting a value
org.elasticsearch.common.jackson.JsonGenerationException: Can not write a
field name, expecting a value
at
org.elasticsearch.common.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480)
at
org.elasticsearch.common.jackson.impl.Utf8Generator.writeFieldName(Utf8Generator.java:270)
at
org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeFieldName(JsonXContentGenerator.java:73)
at
org.elasticsearch.common.xcontent.XContentBuilder.field(XContentBuilder.java:262)
at org.elasticsearch.river.jdbc.Merger.build(Merger.java:303)
at org.elasticsearch.river.jdbc.Merger.build(Merger.java:309)
at org.elasticsearch.river.jdbc.Merger.flush(Merger.java:219)
at org.elasticsearch.river.jdbc.Merger.close(Merger.java:251)
at
org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:203)
at java.lang.Thread.run(Unknown Source
Here is my River
{
"type" : "jdbc",
"jdbc" : {
"driver" : "oracle.jdbc.driver.OracleDriver",
"url" : "my_url",
"user" : "myuser",
"password" : "mypass",
"sql" : "select p.PERSON_ID as "_id", p.PERSON_ID as "id",
p.FIRSTNAME as "firstName", pe.email_address as "person.emails" from
person p join person_email pe on pe.person_id = p.person_id",
"poll": "72h",
"versioning": false
},
"index" : {
"index" : "people",
"type" : "person"
}
}
I'm also running into this issue: when exposing '_id' in my query and
trying to construct objects, I end up with the trace described below. When
not using '_id', everything works just fine.
Thanks!
For reference, the encountered trace is:
org.elasticsearch.common.jackson.JsonGenerationException: Can not write a
field name, expecting a value
at
org.elasticsearch.common.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480)
at
org.elasticsearch.common.jackson.impl.Utf8Generator.writeFieldName(Utf8Generator.java:270)
at
org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeFieldName(JsonXContentGenerator.java:73)
at
org.elasticsearch.common.xcontent.XContentBuilder.field(XContentBuilder.java:262)
at org.elasticsearch.river.jdbc.Merger.build(Merger.java:313)
at org.elasticsearch.river.jdbc.Merger.flush(Merger.java:226)
at org.elasticsearch.river.jdbc.Merger.row(Merger.java:195)
at org.elasticsearch.river.jdbc.SQLService.processRow(SQLService.java:771)
at org.elasticsearch.river.jdbc.SQLService.nextRow(SQLService.java:191)
at
org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:201)
at java.lang.Thread.run(Thread.java:680)
A note, I would welcome you to enter the issues into the github issue
tracker at GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch so I can
make substantial progress on them - the next version is overdue. Pull
requests, patches, test cases, wiki docs are very welcome!
Cheers,
Jörg
On Thursday, November 15, 2012 1:23:50 PM UTC+1, cubic1271 wrote:
Hi:
I'm also running into this issue: when exposing '_id' in my query and
trying to construct objects, I end up with the trace described below. When
not using '_id', everything works just fine.
Thanks!
For reference, the encountered trace is:
org.elasticsearch.common.jackson.JsonGenerationException: Can not write a
field name, expecting a value
at
org.elasticsearch.common.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480)
at
org.elasticsearch.common.jackson.impl.Utf8Generator.writeFieldName(Utf8Generator.java:270)
at
org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeFieldName(JsonXContentGenerator.java:73)
at
org.elasticsearch.common.xcontent.XContentBuilder.field(XContentBuilder.java:262)
at org.elasticsearch.river.jdbc.Merger.build(Merger.java:313)
at org.elasticsearch.river.jdbc.Merger.flush(Merger.java:226)
at org.elasticsearch.river.jdbc.Merger.row(Merger.java:195)
at org.elasticsearch.river.jdbc.SQLService.processRow(SQLService.java:771)
at org.elasticsearch.river.jdbc.SQLService.nextRow(SQLService.java:191)
at
org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:201)
at java.lang.Thread.run(Thread.java:680)
On Thursday, November 15, 2012 8:56:07 AM UTC-5, Jörg Prante wrote:
Warm thanks to all for trying the JDBC river!
A note, I would welcome you to enter the issues into the github issue
tracker at GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch so I can
make substantial progress on them - the next version is overdue. Pull
requests, patches, test cases, wiki docs are very welcome!
Cheers,
Jörg
On Thursday, November 15, 2012 1:23:50 PM UTC+1, cubic1271 wrote:
Hi:
I'm also running into this issue: when exposing '_id' in my query and
trying to construct objects, I end up with the trace described below. When
not using '_id', everything works just fine.
Thanks!
For reference, the encountered trace is:
org.elasticsearch.common.jackson.JsonGenerationException: Can not write a
field name, expecting a value
at
org.elasticsearch.common.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480)
at
org.elasticsearch.common.jackson.impl.Utf8Generator.writeFieldName(Utf8Generator.java:270)
at
org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeFieldName(JsonXContentGenerator.java:73)
at
org.elasticsearch.common.xcontent.XContentBuilder.field(XContentBuilder.java:262)
at org.elasticsearch.river.jdbc.Merger.build(Merger.java:313)
at org.elasticsearch.river.jdbc.Merger.flush(Merger.java:226)
at org.elasticsearch.river.jdbc.Merger.row(Merger.java:195)
at org.elasticsearch.river.jdbc.SQLService.processRow(SQLService.java:771)
at org.elasticsearch.river.jdbc.SQLService.nextRow(SQLService.java:191)
at
org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:201)
at java.lang.Thread.run(Thread.java:680)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.