# Trying to grok ClassCastException

**URL:** <https://discuss.elastic.co/t/trying-to-grok-classcastexception/50273>\
**Category:** Logstash\
**Created:** [May 17, 2016, 11:22pm UTC](https://discuss.elastic.co/t/trying-to-grok-classcastexception/50273 "2016-05-17T23:22:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laidig](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@laidig](https://discuss.elastic.co/u/laidig)\
**Post date:** [May 17, 2016, 11:22pm UTC](https://discuss.elastic.co/t/trying-to-grok-classcastexception/50273/1 "2016-05-17T23:22:18Z")

</div>

I am trying out the v5 stack and punching my way through a field of errors

my logstash.conf has two grok statements, which pass the configtest:

```
             match => {"message"=>[
                "%{TIMESTAMP_ISO8601:timestamp} %{NOTSPACE} %{IP:client_ip}:%{NUMBER} %{IP:elb_backend_ip}:%{NUMBER} %{NUMBER} %{NUMBER} %{NUMBER} (?:%{NUMBER}|-) (?:%{NUMBER:backend_status_code:int}|-) %{NUMBER} %{NUMBER:sent_bytes:int} (?:%{QS:request}|-) (?:%{QS:userA
gent}|-) %{NOTSPACE} %{NOTSPACE}"
                ]}}

        grok {match => { "request"=> "%{WORD}\s%{URIPROTO}://%{URIHOST:host}%{URIPATH:upath}%{URIPARAM:params}\s%{GREEDYDATA}"} }

```

Using 5.0.0-alpha2 on Ubuntu 14.04 x64, I get the following:

```
Exception in thread "[main]>worker0" java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
        at com.logstash.Event.tag(Event.java:280)
        at com.logstash.ext.JrubyEventExtLibrary$RubyEvent.ruby_tag(JrubyEventExtLibrary.java:315)
        at com.logstash.ext.JrubyEventExtLibrary$RubyEvent$INVOKER$i$1$0$ruby_tag.call(JrubyEventExtLibrary$RubyEvent$INVOKER$i$1$0$ruby_tag.gen)
        at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
        at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
        at rubyjit.LogStash::Filters::Grok$$filter_428454220f2f91b7ec1ad9e019332db0555035611028566121.block_1$RUBY$ __file__ (/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-grok-2.0.5/lib/logstash/filters/grok.rb:289)
        at rubyjit$LogStash::Filters::Grok$$filter_428454220f2f91b7ec1ad9e019332db0555035611028566121$block_1$RUBY$ __file__.call(rubyjit$LogStash::Filters::Grok$$filter_428454220f2f91b7ec1ad9e019332db0555035611028566121$block_1$RUBY$ __file__ )
      ....

```

Anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![laidig](https://avatars.discourse-cdn.com/v4/letter/l/977dab/32.png) [@laidig](https://discuss.elastic.co/u/laidig)\
**Post date:** [May 23, 2016, 10:01pm UTC](https://discuss.elastic.co/t/trying-to-grok-classcastexception/50273/2 "2016-05-23T22:01:37Z")

</div>

Bumping. Still having the same problem.

---

<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:** [July 6, 2017, 4:56am UTC](https://discuss.elastic.co/t/trying-to-grok-classcastexception/50273/3 "2017-07-06T04:56:35Z")

</div>

Closed on July 6, 2017, 4:56am UTC


