I’m trying to run a rails 3 app on a windows server using jruby and glassfish gem. I can run the app fine using “rails s”. Here’s my probelm:
C:\webapp\mcs>jruby -S glassfish
Starting GlassFish server at: 0.0.0.0:3000 in development environment…
Writing log messages to: C:/webapp/mcs/log/development.log.
Press Ctrl+C to stop.
java/util/ServiceLoader.java:207:in `fail': java.util.ServiceConfigurationError: com.sun.enterprise.module.bootstrap.Pla
tformMain: Provider com.sun.enterprise.glassfish.bootstrap.ASEmbedded could not be instantiated: java.lang.IllegalArgume
ntException: URI is not hierarchical (NativeException)
from java/util/ServiceLoader.java:164:in `access$100'
from java/util/ServiceLoader.java:353:in `next'
from java/util/ServiceLoader.java:421:in `next'
from org/glassfish/api/embedded/Server.java:644:in `getMain'
from org/glassfish/api/embedded/Server.java:263:in `<init>'
from org/glassfish/api/embedded/Server.java:61:in `<init>'
from org/glassfish/api/embedded/Server.java:158:in `build'
from org/glassfish/api/embedded/Server.java:140:in `build'
from org/glassfish/scripting/gem/GlassFishMain.java:122:in `startGlassFishEmbedded'
from org/glassfish/scripting/gem/GlassFishMain.java:298:in `start'
from c:/jruby-1.5.6/lib/ruby/gems/1.8/gems/glassfish-1.0.2-universal-java/lib/server.rb:146:in `start'
from c:/jruby-1.5.6/lib/ruby/gems/1.8/gems/glassfish-1.0.2-universal-java/lib/server.rb:146:in `start'
from C:/jruby-1.5.6/lib/ruby/gems/1.8/gems/glassfish-1.0.2-universal-java/bin/glassfish:55
from C:/jruby-1.5.6/lib/ruby/gems/1.8/gems/glassfish-1.0.2-universal-java/bin/glassfish:19:in `load'
from c:/jruby-1.5.6/bin/glassfish:19
I’m sure it’s a simple environment setup thing, any suggestions? Much appreciated.
I got this working by simply backing out to jruby-1.5.5. I intend to do a blog post on how I got this all running, because it was a bit of a nightmare, but it does appear to be holding together at the moment. my setup is:
windows server 2003 R2, rails 3.0.3, jruby 1.5.5, glassfish gem 1.0.2
NOTE: I think this fix solves the problem in jruby-1.5.6 but not yet in the compiled distro, so I just decided to back out:
https://github.com/jruby/jruby/commit/621bce3056f71cc9cd0e1b8aa59cecae1fc15e45