Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8282067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:14:52+00:00 2026-06-08T10:14:52+00:00

I’m trying to pack two JRuby Sinatra web apps (runtime 1.9) bundled with warbler

  • 0

I’m trying to pack two JRuby Sinatra web apps (runtime 1.9) bundled with warbler into an ear file. After deploying in glassfish (2.1.1 or 3.1) I have a crash.

JRuby.jar, jruby-stdlib.jar and jruby-rack.jar are accesible in the classpath of both applications and both of them deploy correctly if I leave only one of them. But if I leave them two the second one always crashes while deploying for an error during rack startup:

[#|2012-07-20T10:00:10.743+0200|INFO|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=Thread-34;|PWC1412: WebModule[/licences] ServletContext.log():INFO: jruby 1.6.7.2 (ruby-1.9.2-p312) (2012-05-01 26e08ba) (Java HotSpot(TM) Client VM 1.6.0_30) [linux-i386-java]|#]

[#|2012-07-20T10:00:10.744+0200|INFO|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=Thread-34;|PWC1412: WebModule[/licences] ServletContext.log():INFO: using a shared (threadsafe!) runtime|#]

[#|2012-07-20T10:00:11.926+0200|INFO|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=Thread-34;|PWC1412: WebModule[/licences] ServletContext.log():An exception happened during JRuby-Rack startup
invalid runtime
--- System
jruby 1.6.7.2 (ruby-1.9.2-p312) (2012-05-01 26e08ba) (Java HotSpot(TM) Client VM 1.6.0_30) [linux-i386-java]
Time: 2012-07-20 10:00:11 +0200
Server: Sun GlassFish Enterprise Server v2.1.1
jruby.home: file:/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/lib/jruby-stdlib.jar!/META-INF/jruby.home

--- Context Init Parameters:
com.sun.faces.forceLoadConfiguration = true
com.sun.faces.injectionProvider = com.sun.faces.vendor.GlassFishInjectionProvider
com.sun.faces.validateXml = true
jruby.compat.version = 1.9
public.root = /
rack.env = production

--- Backtrace
RuntimeError: invalid runtime
        require at org/jruby/RubyKernel.java:1042
        require at file:/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
            Ext at /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json/ext.rb:13
           JSON at /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json/ext.rb:12
         (root) at /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json/ext.rb:9
        require at org/jruby/RubyKernel.java:1042
        require at file:/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
           JSON at /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json/ext.rb:58
         (root) at /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json.rb:54
        require at org/jruby/RubyKernel.java:1042
        require at file:/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60
        require at file:/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55
         (root) at /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json.rb:3
        require at org/jruby/RubyKernel.java:1042
        require at /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/./lib/licences.rb:36
         (root) at /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/config.ru:1
  instance_eval at org/jruby/RubyBasicObject.java:1730
     initialize at /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/rack-1.4.1/lib/rack/builder.rb:51
         (root) at /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/config.ru:1

--- RubyGems
Gem.dir: /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems
Gem.path:
/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems
Activated gems:
  rack-1.4.1
  haml-3.1.6
  rack-protection-1.2.0
  tilt-1.3.3
  sinatra-1.3.2
  json-1.7.3

--- Bundler
undefined method `bundle_path' for Bundler:Module

--- JRuby-Rack Config
compat_version = RUBY1_9
default_logger = org.jruby.rack.logging.StandardOutLogger@171c310
err = org.apache.jasper.util.SystemLogHandler@d9b1cd
filter_adds_html = true
filter_verifies_resource = false
ignore_environment = false
initial_memory_buffer_size = 
initial_runtimes = 
jms_connection_factory = 
jms_jndi_properties = 
logger = org.jruby.rack.logging.ServletContextLogger@11196da
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_memory_buffer_size = 
maximum_runtimes = 
num_initializer_threads = 
out = com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingPrintStream@31c0d7
rackup = 
rackup_path = 
rewindable = true
runtime_arguments = 
runtime_timeout_seconds = 
serial_initialization = false
servlet_context = org.apache.catalina.core.ApplicationContextFacade@1033f5a
|#]

[#|2012-07-20T10:00:11.928+0200|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=Thread-34;_RequestID=bb69f89a-3d4a-46db-9b73-34ab72248271;|WebModule[/licences]ERROR: unable to create shared application instance
org.jruby.rack.RackInitializationException: invalid runtime
 from file:/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
 from /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json/ext.rb:13:in `Ext'
 from /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json/ext.rb:12:in `JSON'
 from /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json/ext.rb:9:in `(root)'
 from org/jruby/RubyKernel.java:1042:in `require'
 from file:/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
 from /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json/ext.rb:58:in `JSON'
 from /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json.rb:54:in `(root)'
 from org/jruby/RubyKernel.java:1042:in `require'
 from file:/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `require'
 from file:/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `require'
 from /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/gems/gems/json-1.7.3/lib/json.rb:3:in `(root)'
 from org/jruby/RubyKernel.java:1042:in `require'
 from /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/./lib/licences.rb:36:in `require'
 from /usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/licences-web_war/WEB-INF/config.ru:1:in `(root)'
 from..

Based on the error, it looks like the second application for a reason theat I can’t understand is using 1.8 rubygems:

require at file:/usr/local/glassfish/domains/myapp-domain/applications/j2ee-apps/myapp-server/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36

There is no require ‘rubygems’ in my code or such.

My gemfile.lock is

  remote: http://rubygems.org/
  specs:
    haml (3.1.6)
    jruby-jars (1.6.7.2)
    jruby-rack (1.1.7)
    json (1.7.3)
    mime-types (1.19)
    rack (1.4.1)
    rack-protection (1.2.0)
      rack
    rack-test (0.6.1)
      rack (>= 1.0)
    rake (0.9.2.2)
    rest-client (1.6.7)
      mime-types (>= 1.16)
    rspec-mocks (2.11.1)
    rubyzip (0.9.9)
    sinatra (1.3.2)
      rack (~> 1.3, >= 1.3.6)
      rack-protection (~> 1.2)
      tilt (~> 1.3, >= 1.3.3)
    tilt (1.3.3)
    warbler (1.3.5)
      jruby-jars (>= 1.4.0)
      jruby-rack (>= 1.0.0)
      rake (>= 0.8.7)
      rubyzip (>= 0.9.4)

PLATFORMS
  x86-mingw32

DEPENDENCIES
  haml
  json
  rack-test
  rest-client
  rspec-mocks
  sinatra
  warbler

Thanks a lot in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:14:54+00:00Added an answer on June 8, 2026 at 10:14 am

    Looks like by default in glassfish jar files are shared between war applications and looks like jruby-rack does not like being shared all around.

    Some changes in sun-web.xml were needed in my case to isolate classloader

    http://docs.oracle.com/cd/E19316-01/820-4336/beadh/index.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to render a haml file in a javascript response like so:
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.