# :exception=\>java.lang.ClassCastException: org.jruby.RubyArray cannot be cast to org.jruby.RubyIO, :level=\>:warn

**URL:** <https://discuss.elastic.co/t/exception-java-lang-classcastexception-org-jruby-rubyarray-cannot-be-cast-to-org-jruby-rubyio-level-warn/62895>\
**Category:** Logstash\
**Created:** [October 13, 2016, 5:58am UTC](https://discuss.elastic.co/t/exception-java-lang-classcastexception-org-jruby-rubyarray-cannot-be-cast-to-org-jruby-rubyio-level-warn/62895 "2016-10-13T05:58:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ltkdrop1](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@ltkdrop1](https://discuss.elastic.co/u/ltkdrop1)\
**Post date:** [October 13, 2016, 5:58am UTC](https://discuss.elastic.co/t/exception-java-lang-classcastexception-org-jruby-rubyarray-cannot-be-cast-to-org-jruby-rubyio-level-warn/62895/1 "2016-10-13T05:58:21Z")

</div>

Hi,

I am currently using HTTP\_POLLER to get inputs into the following JSON\_PARSER and I encountered the following errors :-

Error parsing json {:source=\>"value", :raw=\>[{"Type"=\>"Roadwork", "Latitude"=\>#BigDecimal:6a08d4d8,'0.13000136016810628E1',17(20), "Longitude"=\>#BigDecimal:3ba29861,'0.10389068382210294E3',17(20), "Message"=\>"(13/10)10:05 Roadworks on Mountbatten Road (towards City) after Tanjong Katong Road South. Avoid right lane."}, {"Type"=\>"Roadwork", "Latitude"=\>#BigDecimal:8f1d35,'0.12755468885705177E1',17(20), "Longitude"=\>#BigDecimal:2c8da7e8,'0.10384895751623928E3',17(20), "Message"=\>"(13/10)10:03 Roadworks on Maxwell Road (towards Marina View) after Shenton Way. Avoid left lane."}, {"Type"=\>"Roadwork", "Latitude"=\>#BigDecimal:7b65e357,'0.13203311989092505E1',17(20), "Longitude"=\>#BigDecimal:37b3fbb,'0.10390504377795884E3',17(20), "Message"=\>"(13/10)10:02 Roadworks on Jalan Eunos (towards Hougang) after Changi Road. Avoid right lane."}, {"Type"=\>"Roadwork", "Latitude"=\>#BigDecimal:5b4e2e11,'0.13615389353078684E1',17(20), "Longitude"=\>#BigDecimal:f651174,'0.10370376397785842E3',17(20), "Message"=\>"(13/10)10:02 Roadworks on KJE (towards PIE) before PIE(Tuas) Exit. Avoid lane 1."}, {"Type"=\>"Roadwork", "Latitude"=\>#BigDecimal:54e6870a,'0.12955039706256881E1',17(20), "Longitude"=\>#BigDecimal:7e720521,'0.103887417516725E3',15(16), "Message"=\>"(13/10)10:01 Roadworks on ECP (towards City) at Fort Rd Exit."}, {"Type"=\>"Roadwork", "Latitude"=\>#BigDecimal:47923888,'0.13428650489326706E1',17(20), "Longitude"=\>#BigDecimal:27ac39a7,'0.10383761692359079E3',17(20), "Message"=\>"(13/10)10:00 Roadworks on Thomson Road (towards SLE) after MacRitchie Reservoir. Avoid right lane."}, {"Type"=\>"Vehicle breakdown", "Latitude"=\>#BigDecimal:5cf2ac96,'0.13309490636997763E1',17(20), "Longitude"=\>#BigDecimal:35df344c,'0.1038623992761848E3',16(20), "Message"=\>"(13/10)10:07 Vehicle breakdown on CTE (towards AYE) after PIE(Changi) Exit."}, {"Type"=\>"Vehicle breakdown", "Latitude"=\>#BigDecimal:7f1e175c,'0.13294233500324433E1',17(20), "Longitude"=\>#BigDecimal:36c18235,'0.1038419023811822E3',16(20), "Message"=\>"(13/10)10:04 Vehicle breakdown on PIE (towards Tuas) after Thomson Rd Exit."}, {"Type"=\>"Vehicle breakdown", "Latitude"=\>#BigDecimal:6ad84f67,'0.13585774824187953E1',17(20), "Longitude"=\>#BigDecimal:65730197,'0.10378196057705365E3',17(20), "Message"=\>"(13/10)10:01 Vehicle breakdown on BKE (towards PIE) after Dairy Farm Rd Entrance."}], :exception=\>java.lang.ClassCastException: org.jruby.RubyArray cannot be cast to org.jruby.RubyIO, :level=\>:warn}

How can I resolve this issue?

Thanks.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 15, 2016, 5:46am UTC](https://discuss.elastic.co/t/exception-java-lang-classcastexception-org-jruby-rubyarray-cannot-be-cast-to-org-jruby-rubyio-level-warn/62895/2 "2016-10-15T05:46:43Z")

</div>

What's your config look like?  
What version?

---

<div class="post-metadata">

**Author:** ![ltkdrop1](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@ltkdrop1](https://discuss.elastic.co/u/ltkdrop1)\
**Post date:** [October 17, 2016, 6:28am UTC](https://discuss.elastic.co/t/exception-java-lang-classcastexception-org-jruby-rubyarray-cannot-be-cast-to-org-jruby-rubyio-level-warn/62895/3 "2016-10-17T06:28:58Z")

</div>

Hi warkolm,

Thanks for replying.

Below is my config file :-

input {  
http\_poller {  
urls =\> {  
test1 =\> {  
method =\> get  
url =\> "[http://datamall2.mytransport.sg/ltaodataservice/TrafficIncidents?"](http://datamall2.mytransport.sg/ltaodataservice/TrafficIncidents?%22)  
headers =\> {  
AccountKey =\> "xxxx"  
UniqueUserID =\> "xxxx"  
accept =\> "application/json"  
}  
}  
}  
interval =\> 10  
}  
}  
filter {  
mutate {  
rename =\> {"odata.metadata" =\> "odata\_metadata"}  
}  
json {  
source =\> "value"  
}  
}  
output {  
stdout {  
codec =\> rubydebug  
}  
}

---

<div class="post-metadata">

**Author:** ![ltkdrop1](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@ltkdrop1](https://discuss.elastic.co/u/ltkdrop1)\
**Post date:** [October 18, 2016, 6:09am UTC](https://discuss.elastic.co/t/exception-java-lang-classcastexception-org-jruby-rubyarray-cannot-be-cast-to-org-jruby-rubyio-level-warn/62895/4 "2016-10-18T06:09:11Z")

</div>

Hi warkolm,

I am currently using version 2.4.

Thanks.

---

<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:33am UTC](https://discuss.elastic.co/t/exception-java-lang-classcastexception-org-jruby-rubyarray-cannot-be-cast-to-org-jruby-rubyio-level-warn/62895/5 "2017-07-06T04:33:48Z")

</div>


