java.lang.reflect.Modifier

Description

I'm getting this error when I am trying to run logstsh on Raspberry Pi:

Exception in thread "main" org.jruby.exceptions.RaiseException: (ArgumentError) cannot import class `java.lang.reflect.Modifier' as `Modifier'
at RUBY.java_import(file:/home/pi/logstash-1.2.2-flatjar.jar!/jruby/java/core_ext/object.rb:63)
at org.jruby.RubyArray.map(org/jruby/RubyArray.java:2413)
at RUBY.java_import(file:/home/pi/logstash-1.2.2-flatjar.jar!/jruby/java/core_ext/object.rb:22)
at RUBY.ModifierShortcuts(file:/home/pi/logstash-1.2.2-flatjar.jar!/jruby/java/java_ext/java.lang.rb:73)
at RUBY.(root)(file:/home/pi/logstash-1.2.2-flatjar.jar!/jruby/java/java_ext/java.lang.rb:72)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1082)
at RUBY.(root)(file:/home/pi/logstash-1.2.2-flatjar.jar!/jruby/java/java_ext.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1082)
at RUBY.(root)(file:/home/pi/logstash-1.2.2-flatjar.jar!/jruby/java/java_ext.rb:3)

Gliffy Diagrams

Activity

Show:

Lee Nelson January 23, 2014 at 4:41 AM

I had the same problem. I was able to get it to run by building from source as described here:
https://github.com/logstash/logstash

My RaspberryPi is running Debian Wheezy. The jruby version that it installs is 1.6. This error observed above is a result of jruby 1.6 not having full ARM support (I didn't fully understand the particulars). But it popped in a couple places that the issue is fixed in jruby 1.7. I had to go through the exercise of installing rvm on Wheezy (documented in many places if your Google it), then install jruby-1.7.9. I installed ruby-1.9.3 while I was at. Remember to do "rvm use jruby-1.7.9" and "rvm use ruby-1.9.3". There were several other dependencies I had to install. I don't remember them all, but here's a partial list:

libmysqld-dev
openjdk-7-jre
openjdk-7-jdk

I also shotgunned in all the dependencies described here:
http://www.cschramm.net/howtos/installing-ruby-1-9-3-debian-squeeze-rvm/

Beware that this whole process will likely take several hours. The upside is that most of this software gets compiled natively for the RaspberryPi.

After all this effort, I was able to run bin/logstash agent -f /etc/logstash.conf and it started up.

Details

Assignee

Reporter

Created November 30, 2013 at 12:45 AM
Updated April 11, 2014 at 4:43 AM