Indexing:"tried to parse as object, but got EOF"


(Haakon) #1

Hi, I have this problem with some objects, but I cant figure out why. Indexing to the REST API using jersey and through the java api I get the same thing. Maybe its easy for some of you to see what I`m doing
wrong?

Server stack:

[2011-08-15 15:10:01,058][DEBUG][action.index ]
[Warstrike] [xxxx.no_side][2], node[_G_Be0BURc
mDub833twayw], [P], s[STARTED]: Failed to execute [index
{[xxxx.no_side][ArticleFolder][373], source[{"FOL
DER":{"NAME":"24t VVS
D°gnservice","ID":"373","URL":"./?module=Articles;action=ArticleFolder.publicOpenFolder;ID=373","
FOLDERPATH":"24t_VVS_Dognservice/","ATTRIBUTES":{"ATTRIBUTE":[{"NAME":"Mappebilde","LABEL":"folder_img","VALUE":{"FILE"
:{"ID":"645","FILEFOLDER_ID":"59","NAME":"RSWEB24SERVICE1.jpg","SIZE":"41183","HEIGHT":"0","WIDTH":"0","FILENAME":"RSWEB
24SERVICE1.jpg","MIMETYPE":"image/jpeg","FILETYPE":"image","LAST_MODIFIED":{"DATE":{"YEAR":"2007","MONTH":"8","DAY":"28
","WEEKDAY":"3","HOUR":"15","MINUTE":"25","SECOND":"38","MS":"0","MS1970":"1188307538000"}},"OBJECT_MODIFIED":{"DATE":{"
YEAR":"2011","MONTH":"5","DAY":"20","WEEKDAY":"6","HOUR":"13","MINUTE":"23","SECOND":"52","MS":"617","MS1970":"130589063
2617"}},"OBJECT_CREATED":{"DATE":{"YEAR":"2011","MONTH":"5","DAY":"20","WEEKDAY":"6","HOUR":"13","MINUTE":"23","SECOND":
"52","MS":"617","MS1970":"1305890632617"}},"ATTRIBUTES":""}},"@ID":"25"},{"NAME":"Meta
n°kkelord","LABEL":"meta_keywords
","VALUE":"R°rleggere Oslo Trondheim 24 T D°gnservice VVS
R°rlegger","@ID":"28"},{"NAME":"Meta beskrivelse","LABEL":"met
a_description","VALUE":"R°rleggere for sm? og store VVS oppdrag i Oslo
og Trondheim. 24 T D°gnservice","@ID":"29"},{"NA
ME":"Vindustittel","LABEL":"meta_title","VALUE":"R°rleggere Oslo
Trondheim 24 T D°gnservice VVS R°rlegger","@ID":"30"}]}
}}]}]
org.elasticsearch.index.mapper.MapperParsingException: object_mapper
[ATTRIBUTE] tried to parse as object, but got EOF,
has a concrete value been provided to it?
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:439)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:569)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray(ObjectMapper.java:560)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:433)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:533)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:431)
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:533)
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:431)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:567)
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:491)
at org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:269)
at org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:193)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationActi
on.performOnPrimary(TransportShardReplicationOperationAction.java:428)
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationActi
on$1.run(TransportShardReplicationOperationAction.java:341)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)


Example of structure:

{
"FOLDER":{
"NAME":"24t VVS Døgnservice",
"ID":"373",
"URL":"./?module=Articles;action=ArticleFolder.publicOpenFolder;ID=373",
"FOLDERPATH":"24t_VVS_Dognservice/",
"ATTRIBUTES":{
"ATTRIBUTE":[
{
"NAME":"Mappebilde",
"LABEL":"folder_img",
"VALUE":{
"FILE":{
"ID":"645",
"FILEFOLDER_ID":"59",
"NAME":"RSWEB24SERVICE1.jpg",
"SIZE":"41183",
"HEIGHT":"0",
"WIDTH":"0",
"FILENAME":"RSWEB24SERVICE1.jpg",
"MIMETYPE":"image/jpeg",
"FILETYPE":"image",
"LAST_MODIFIED":{
"DATE":{
"YEAR":"2007",
"MONTH":"8",
"DAY":"28",
"WEEKDAY":"3",
"HOUR":"15",
"MINUTE":"25",
"SECOND":"38",
"MS":"0",
"MS1970":"1188307538000"
}
},
"OBJECT_MODIFIED":{
"DATE":{
"YEAR":"2011",
"MONTH":"5",
"DAY":"20",
"WEEKDAY":"6",
"HOUR":"13",
"MINUTE":"23",
"SECOND":"52",
"MS":"617",
"MS1970":"1305890632617"
}
},
"OBJECT_CREATED":{
"DATE":{
"YEAR":"2011",
"MONTH":"5",
"DAY":"20",
"WEEKDAY":"6",
"HOUR":"13",
"MINUTE":"23",
"SECOND":"52",
"MS":"617",
"MS1970":"1305890632617"
}
},
"ATTRIBUTES":""
}
},
"@ID":"25"
},
{
"NAME":"Meta nøkkelord",
"LABEL":"meta_keywords",
"VALUE":"Rørleggere Oslo Trondheim 24 T Døgnservice VVS
Rørlegger",
"@ID":"28"
},
{
"NAME":"Meta beskrivelse",
"LABEL":"meta_description",
"VALUE":"Rørleggere for små og store VVS oppdrag i Oslo
og Trondheim. 24 T Døgnservice",
"@ID":"29"
},
{
"NAME":"Vindustittel",
"LABEL":"meta_title",
"VALUE":"Rørleggere Oslo Trondheim 24 T Døgnservice VVS
Rørlegger",
"@ID":"30"
}
]
}
}
}

Regards,
Haakon


(Shay Banon) #2

This usually happens when you index a document which has a json field, and
then in another document, it becomes an object. If not, can you gist a
recreation?

On Tue, Aug 16, 2011 at 10:12 AM, Haakon haalind@gmail.com wrote:

Hi, I have this problem with some objects, but I cant figure out why. Indexing to the REST API using jersey and through the java api I get the same thing. Maybe its easy for some of you to see what I`m doing
wrong?

Server stack:

[2011-08-15 15:10:01,058][DEBUG][action.index ]
[Warstrike] [xxxx.no_side][2], node[_G_Be0BURc
mDub833twayw], [P], s[STARTED]: Failed to execute [index
{[xxxx.no_side][ArticleFolder][373], source[{"FOL
DER":{"NAME":"24t VVS

D°gnservice","ID":"373","URL":"./?module=Articles;action=ArticleFolder.publicOpenFolder;ID=373","

FOLDERPATH":"24t_VVS_Dognservice/","ATTRIBUTES":{"ATTRIBUTE":[{"NAME":"Mappebilde","LABEL":"folder_img","VALUE":{"FILE"

:{"ID":"645","FILEFOLDER_ID":"59","NAME":"RSWEB24SERVICE1.jpg","SIZE":"41183","HEIGHT":"0","WIDTH":"0","FILENAME":"RSWEB

24SERVICE1.jpg","MIMETYPE":"image/jpeg","FILETYPE":"image","LAST_MODIFIED":{"DATE":{"YEAR":"2007","MONTH":"8","DAY":"28

","WEEKDAY":"3","HOUR":"15","MINUTE":"25","SECOND":"38","MS":"0","MS1970":"1188307538000"}},"OBJECT_MODIFIED":{"DATE":{"

YEAR":"2011","MONTH":"5","DAY":"20","WEEKDAY":"6","HOUR":"13","MINUTE":"23","SECOND":"52","MS":"617","MS1970":"130589063

2617"}},"OBJECT_CREATED":{"DATE":{"YEAR":"2011","MONTH":"5","DAY":"20","WEEKDAY":"6","HOUR":"13","MINUTE":"23","SECOND":

"52","MS":"617","MS1970":"1305890632617"}},"ATTRIBUTES":""}},"@ID":"25"},{"NAME":"Meta
n°kkelord","LABEL":"meta_keywords
","VALUE":"R°rleggere Oslo Trondheim 24 T D°gnservice VVS
R°rlegger","@ID":"28"},{"NAME":"Meta beskrivelse","LABEL":"met
a_description","VALUE":"R°rleggere for sm? og store VVS oppdrag i Oslo
og Trondheim. 24 T D°gnservice","@ID":"29"},{"NA
ME":"Vindustittel","LABEL":"meta_title","VALUE":"R°rleggere Oslo
Trondheim 24 T D°gnservice VVS R°rlegger","@ID":"30"}]}
}}]}]
org.elasticsearch.index.mapper.MapperParsingException: object_mapper
[ATTRIBUTE] tried to parse as object, but got EOF,
has a concrete value been provided to it?
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:439)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:569)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray(ObjectMapper.java:560)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:433)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:533)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:431)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:533)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:431)
at
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:567)
at
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:491)
at
org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:269)
at
org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:193)
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationActi
on.performOnPrimary(TransportShardReplicationOperationAction.java:428)
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationActi
on$1.run(TransportShardReplicationOperationAction.java:341)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)


Example of structure:

{
"FOLDER":{
"NAME":"24t VVS Døgnservice",
"ID":"373",

"URL":"./?module=Articles;action=ArticleFolder.publicOpenFolder;ID=373",
"FOLDERPATH":"24t_VVS_Dognservice/",
"ATTRIBUTES":{
"ATTRIBUTE":[
{
"NAME":"Mappebilde",
"LABEL":"folder_img",
"VALUE":{
"FILE":{
"ID":"645",
"FILEFOLDER_ID":"59",
"NAME":"RSWEB24SERVICE1.jpg",
"SIZE":"41183",
"HEIGHT":"0",
"WIDTH":"0",
"FILENAME":"RSWEB24SERVICE1.jpg",
"MIMETYPE":"image/jpeg",
"FILETYPE":"image",
"LAST_MODIFIED":{
"DATE":{
"YEAR":"2007",
"MONTH":"8",
"DAY":"28",
"WEEKDAY":"3",
"HOUR":"15",
"MINUTE":"25",
"SECOND":"38",
"MS":"0",
"MS1970":"1188307538000"
}
},
"OBJECT_MODIFIED":{
"DATE":{
"YEAR":"2011",
"MONTH":"5",
"DAY":"20",
"WEEKDAY":"6",
"HOUR":"13",
"MINUTE":"23",
"SECOND":"52",
"MS":"617",
"MS1970":"1305890632617"
}
},
"OBJECT_CREATED":{
"DATE":{
"YEAR":"2011",
"MONTH":"5",
"DAY":"20",
"WEEKDAY":"6",
"HOUR":"13",
"MINUTE":"23",
"SECOND":"52",
"MS":"617",
"MS1970":"1305890632617"
}
},
"ATTRIBUTES":""
}
},
"@ID":"25"
},
{
"NAME":"Meta nøkkelord",
"LABEL":"meta_keywords",
"VALUE":"Rørleggere Oslo Trondheim 24 T Døgnservice VVS
Rørlegger",
"@ID":"28"
},
{
"NAME":"Meta beskrivelse",
"LABEL":"meta_description",
"VALUE":"Rørleggere for små og store VVS oppdrag i Oslo
og Trondheim. 24 T Døgnservice",
"@ID":"29"
},
{
"NAME":"Vindustittel",
"LABEL":"meta_title",
"VALUE":"Rørleggere Oslo Trondheim 24 T Døgnservice VVS
Rørlegger",
"@ID":"30"
}
]
}
}
}

Regards,
Haakon


(system) #3