# Parse Exception NoMethodDefined

**URL:** <https://discuss.elastic.co/t/parse-exception-nomethoddefined/256997>\
**Category:** Elasticsearch\
**Created:** [November 29, 2020, 5:41pm UTC](https://discuss.elastic.co/t/parse-exception-nomethoddefined/256997 "2020-11-29T17:41:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shani](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@shani](https://discuss.elastic.co/u/shani)\
**Post date:** [November 29, 2020, 5:41pm UTC](https://discuss.elastic.co/t/parse-exception-nomethoddefined/256997/1 "2020-11-29T17:41:51Z")

</div>

What should we do if raw xml log contains nil value, logstash throws exception like

`> [[main]>worker0] xml - Error parsing xml with XmlSimple {:source=>"message", :value=>"<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'><System><Provider Name='Service Control Manager' Guid='{555908d1-a6d7-4695-8e1e-26931d2012f4}' EventSourceName='Service Control Manager'/><EventID Qualifiers='16384'>7036</EventID><Version>0</Version><Level>Information</Level><Task>None</Task><Opcode></\\nOpcode><Keywords>Classic</Keywords><TimeCreated SystemTime='2020-02-01T00:55:45.040458400Z'/><EventRecordID>296447</EventRecordID><Correlation/><Execution ProcessID='712' ThreadID='6072'/><Channel>System</Channel><Computer>Tabc.local</Computer><Security/></System><EventData>The WinHTTP Web Proxy Auto-Discovery Service service entered the running state.</EventData></Event>", :exception=>#<REXML::ParseException: #<NoMethodError: undefined method `' for nil:NilClass\>`

Here opecode \</\nOpcode\> is reason of this exception. I'm using XML filter and getting parsed data using xpack, if I remove the opcode \</\nOpcode\> from the raw log then my logstash conf works ok.

What should I do in this case?

---

<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:** [December 27, 2020, 5:41pm UTC](https://discuss.elastic.co/t/parse-exception-nomethoddefined/256997/2 "2020-12-27T17:41:54Z")

</div>

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