Sonar server (using JRuby) on Raspberry Pi with OpenJDK, arm CPU and tomcat 7

Hi,

I’m getting a JRuby error message when trying to run Sonar server on
raspberry pi ( http://www.raspberrypi.org/ ). For me it’s like a fun
challenge. :slight_smile:

Raspberry Pi stats:
700MHz - 1GHz(dynamic overclocked) ARM v5 hf CPU
256 MB Ram for system and Graphic. I give 232 MB to system.

I run it as WAR file in tomcat 7 installed via Raspbian (debian port for
arm hard float) package manager.

I use OpenJDK 7 as Java implementation (there is no Oracle Java VM for
Raspbian hard float distribution)

java version “1.7.0_07”
OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-1+rpi1)
OpenJDK Zero VM (build 22.0-b10, mixed mode)

The Heap size of tomcat is currently set to 130 MB and I get no
outofmemory error yet.

I have changed nothing on sonar itself. Just generated the war file put
it in the tomcat as ROOT.war and go.

Any ideas? I don’t blame you, if you don’t want to help.

Best Regards
ota-kun

The error I get is the following. (I appended the complete error file as
attachment, too.)

2012.10.25 12:37:37 INFO jruby.rack jruby 1.6.7.2 (ruby-1.8.7-p357)
(2012-05-01 26e08ba) (OpenJDK Zero VM 1.6.0_24) [linux-arm-java]
2012.10.25 12:37:37 INFO jruby.rack using a shared (threadsafe!)
runtime
2012.10.25 12:39:23 ERROR jruby.rack unable to create shared
application instance
org.jruby.rack.RackInitializationException: Illformed requirement [">=
0"]
from
classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:106:in
initialize' from org/jruby/RubyArray.java:2371:inmap!’
from
classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:106:in
initialize' from classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:62:indefault’
from
classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:83:in
Specification' from classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:29:in(root)’
from
classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:51:in
(root)' from org/jruby/RubyKernel.java:1033:inrequire’
from
classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/defaults/jruby.rb:1273:in
(root)' from org/jruby/RubyKernel.java:1033:inrequire’
from
classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:90:in
load_rubygems' from /tmp/tomcat7-tomcat7-tmp/0-ROOT/WEB-INF/config/boot.rb:53:inload_initializer’
from
/tmp/tomcat7-tomcat7-tmp/0-ROOT/WEB-INF/config/boot.rb:38:in run' from /var/cache/tomcat7/Catalina/localhost/_/loader/jruby/rack/rails/boot_hook.rb:21:inrun’
from
/tmp/tomcat7-tomcat7-tmp/0-ROOT/WEB-INF/config/boot.rb:11:in boot!' from /tmp/tomcat7-tomcat7-tmp/0-ROOT/WEB-INF/config/boot.rb:114:in(root)’
from org/jruby/RubyKernel.java:1033:in require' from /tmp/tomcat7-tomcat7-tmp/0-ROOT/WEB-INF/config/boot.rb:8:in(root)’
from org/jruby/RubyKernel.java:1058:in load' from /tmp/tomcat7-tomcat7-tmp/0-ROOT/WEB-INF/config/environment.rb:23:inload_environment’
from
/var/cache/tomcat7/Catalina/localhost/_/loader/jruby/rack/rails_booter.rb:65:in
load_environment' from <script>:1:in(root)’

     at

org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:231)
~[jruby-rack-1.1.10.jar:na]
at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:58)
~[jruby-rack-1.1.10.jar:na]
at
org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:33)
~[jruby-rack-1.1.10.jar:na]
at
org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:48)
[jruby-rack-1.1.10.jar:na]
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4790)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5284)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
[tomcat-catalina-7.0.28.jar:7.0.28]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[na:1.6.0_24]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
[na:1.6.0_24]
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
[na:1.6.0_24]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[na:1.6.0_24]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[na:1.6.0_24]
at java.lang.Thread.run(Thread.java:679) [na:1.6.0_24]
org.jruby.exceptions.RaiseException: (ArgumentError) Illformed
requirement [">= 0"]
at
(Anonymous).parse(classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:81)
~[na:na]
at
Requirement.initialize(classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:106)
~[na:na]
at org.jruby.RubyArray.map!(org/jruby/RubyArray.java:2371)
~[jruby-complete-1.6.7.2.jar:na]
at
Requirement.initialize(classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:106)
~[na:na]
at
(Anonymous).default(classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:62)
~[na:na]
at
(Anonymous).Specification(classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/specification.rb:83)
~[na:na]

I am experiencing a very similar situation with logstash which also uses
jruby. Has there been any activity on this?

[email protected]:/var/log/logstash# uname -a
Linux lab-monitor 2.6.36 #3 PREEMPT Sun Dec 5 16:26:45 GMT 2010 

armv5tel GNU/Linux
[email protected]:/var/log/logstash# java -version
java version “1.6.0_18”
OpenJDK Runtime Environment (IcedTea6 1.8.13)
(6b18-1.8.13-0+squeeze2)
OpenJDK Zero VM (build 14.0-b16, mixed mode)
[email protected]:/var/log/logstash# cat /etc/debian_version
6.0.5

[email protected]:/var/log/logstash# java -jar 

logstash-1.1.4-monolithic.jar agent -f logstash.conf
Exception in thread “main” org.jruby.exceptions.RaiseException:
(ArgumentError) Illformed requirement [">= 0"]
at
RUBY.parse(jar:file:/var/log/logstash/logstash-1.1.4-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/requirement.rb:81)
at
RUBY.initialize(jar:file:/var/log/logstash/logstash-1.1.4-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/requirement.rb:106)
at org.jruby.RubyArray.map!(org/jruby/RubyArray.java:2387)
at
RUBY.initialize(jar:file:/var/log/logstash/logstash-1.1.4-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/requirement.rb:106)
at
RUBY.default(jar:file:/var/log/logstash/logstash-1.1.4-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/requirement.rb:62)
at
RUBY.Specification(jar:file:/var/log/logstash/logstash-1.1.4-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:83)
at
RUBY.(root)(jar:file:/var/log/logstash/logstash-1.1.4-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/specification.rb:29)
at
RUBY.(root)(jar:file:/var/log/logstash/logstash-1.1.4-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/defaults/jruby.rb:1)
at
org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1019)
at
RUBY.(root)(jar:file:/var/log/logstash/logstash-1.1.4-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/defaults/jruby.rb:63)
at
org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1019)
at
RUBY.(root)(jar:file:/var/log/logstash/logstash-1.1.4-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:1)
at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1045)
at
RUBY.(root)(jar:file:/var/log/logstash/logstash-1.1.4-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:1273)

It seems to be fixed with JRuby 1.7.

http://jira.codehaus.org/browse/JRUBY-6884

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs