Getting errors while running tests for plugin

Hi All,
I am trying to write tests for my logstash plugin. When I try to run rspec, this is what I get

bundle exec rspec

NameError: missing class name (`org.apache.logging.log4j.Level')
     method_missing at org/jruby/javasupport/
   <module:Logging> at /Users/madhav.kelkar/.rvm/gems/jruby-
  <module:LogStash> at /Users/madhav.kelkar/.rvm/gems/jruby-
             <main> at /Users/madhav.kelkar/.rvm/gems/jruby-
            require at org/jruby/
             <main> at /Users/madhav.kelkar/.rvm/gems/jruby-
            require at org/jruby/
             <main> at /Users/madhav.kelkar/.rvm/gems/jruby-
            require at org/jruby/
             <main> at /Users/madhav.kelkar/.rvm/gems/jruby-
               load at org/jruby/
    block in (root) at /Users/madhav.kelkar/.rvm/gems/jruby-
               each at org/jruby/
             (root) at /Users/madhav.kelkar/work/logstash-input-es_indexer/spec/inputs/es_indexer_spec.rb:1
             (root) at /Users/madhav.kelkar/work/logstash-input-es_indexer/spec/inputs/es_indexer_spec.rb:2
             (root) at /Users/madhav.kelkar/.rvm/gems/jruby-
    load_spec_files at /Users/madhav.kelkar/.rvm/gems/jruby-
    load_spec_files at /Users/madhav.kelkar/.rvm/gems/jruby-
             <main> at /Users/madhav.kelkar/.rvm/gems/jruby-
               load at org/jruby/
             <eval> at /Users/madhav.kelkar/.rvm/gems/jruby-
               eval at org/jruby/
             <main> at /Users/madhav.kelkar/.rvm/gems/jruby-

Here is my gemspec -

  # Special flag to let us know this is actually a logstash plugin
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }

  # Gem dependencies
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
  s.add_runtime_dependency 'logstash-codec-plain', "3.0.2"
  s.add_runtime_dependency 'stud', '0.0.22'
  s.add_development_dependency 'logstash-devutils', '1.1.0'

l did some research, and looks like there was indeed a problem -

Looks like latest available logstash-core-plugin-api (2.1.22) is using logstash-core My theory is that if a version of logstash-core-plugin-api becomes available which uses logstash-core 5.1.2/5.2.0, my error should go way if I use that version. Can someone confirm this? is there a workaround for errors that I am getting?


I have a website and I want to change the appearance, but the java code is creating an issue and it is giving errors. Can anyone help me in fixing this issue? I am not an expert of coding for the development of a website, due to which I am facing this issue and the person who helps me to write an essay for Paper Writing Service knows a little bit of coding; so he tried to help me. But the issue is not solved, so I need help for it.

Changing this line in gemspec worked for me..

-s.add_development_dependency "logstash-devutils", 
+s.add_development_dependency "logstash-devutils", "~> 1.3", ">= 1.3.1"

I got a similar mistake when attempting to introduce blog stash-yield email on logstash 5.1.1: A blunder happened while introducing logstash-center occasion java, and Bundler can't proceed. Ensure that dissertation editing online succeeds before bundling.

1 Like

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