XML Parser failing -Logstash --- xsi:nil="true"


(Bonsshah) #1

I am trying to parse complete xml without xpath as there are many attributes so can not use xpath. Logstash XML parser is failing at below line of xml.

ERROR :

Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"mqm-payload-itemnew", :_type=>"doc", :_routing=>nil}, #LogStash::Event:0x28fcc44f], :response=>{"index"=>{"_index"=>"mqm-payload-itemnew", "_type"=>"doc", "_id"=>"JZM5MmcBO702AymzFyA3", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"mapper [payload.Body.CountryAttributes.Localization.Country.Gem_SignOff] of different type, current_type [text], merged_type [ObjectMapper]"}}}}

Here is my Logstash XML parser detail

xml {
				source => "xmlmessagepayload"
				store_xml => true
				target => "payload"
				force_array => false
             }

I have tried to remove that xmlns:xsi..... Complete line from attribute and passed which works fine. ( I tried to find out root cause only)

I would really appreciate your input here to get it parse as is with
( xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" )

Thanks
Bons


#2

Hello,
can you provide entire input logic, so that it would be easy to identify the problem and give solution.

Regards,
Balu


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.