Hi there,
i want to ask about this error. anyone know what this error is trying to tell ?
exception=>java.lang.ClassCastException: class org.jruby.RubyHash cannot be cast to class org.jruby.RubyIO (org.jruby.RubyHash and org.jruby.RubyIO are in unnamed module of loader 'app'
this is my config pipeline related to json filter
fyi, i use v 7.13 and my data is like nested json. so it's look like this
Error parsing json {:source=>"data", :raw=>{"sasasas"=>"eiwqo"}, :exception=>#<Java::JavaLang::ClassCastException: class org.jruby.RubyHash cannot be cast to class org.jruby.RubyIO (org.jruby.RubyHash and org.jruby.RubyIO are in unnamed module of loader 'app')>}
Check what the ":raw" data is in your error message. I think the exception is thrown here in JrJackson.
it says "Error parsing json source => "data" ". i can't show you the full log because it contains sensitive data. the error line is just both of this
Error parsing json {:source=>"data"
:exception=>java.lang.ClassCastException: class org.jruby.RubyHash cannot be cast to class org.jruby.RubyIO (org.jruby.RubyHash and org.jruby.RubyIO are in unnamed module of loader 'app'
but strangely, the raw data on field data are still parsed. all of these fields come from data
so it's start from grok pattern. in original raw data, it look like this
(some other data in log) responseBody=[{"responsecode":"00","data": { "name": "xxx"}}]
and in grok pattern i made like this %{TIMESTAMP}.......(some other pattern) ResponseBody=\[%GREEDYDATA:responseBody}\]
so it resulting a field named responseBody and the value will look like this
{"xxxxxx":"xxx","data":{"xxx","dsda":"xxx"}}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.