users@glassfish.java.net

Problem with deploy JRuby application (redmine) to glassfish v3

From: <glassfish_at_javadesktop.org>
Date: Fri, 15 Jan 2010 04:31:52 PST

When I tried to deploy redmine v.0.9 to glassfish I can see this output in log file :

[#|2010-01-15T11:00:34.476+0100|INFO|glassfishv3.0|org.glassfish.scripting.jruby.JRubyContainer|_ThreadID=25;_ThreadName=Thread-1;|Running redmine in development environment.|#]

[#|2010-01-15T11:00:34.477+0100|INFO|glassfishv3.0|org.glassfish.scripting.jruby.JRubyContainer|_ThreadID=25;_ThreadName=Thread-1;|Rails application detected.|#]

[#|2010-01-15T11:00:34.477+0100|INFO|glassfishv3.0|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=25;_ThreadName=Thread-1;|Loading application redmine at /redmine|#]

[#|2010-01-15T11:00:34.644+0100|INFO|glassfishv3.0|org.glassfish.scripting.jruby.JRubyContainer|_ThreadID=25;_ThreadName=Thread-1;|JRuby version is: 1.4.0|#]

[#|2010-01-15T11:00:34.913+0100|INFO|glassfishv3.0|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=25;_ThreadName=Thread-1;|redmine was successfully deployed in 1,205 milliseconds.|#]

[#|2010-01-15T11:00:37.211+0100|INFO|glassfishv3.0|com.sun.grizzly.jruby.rack.JRubyRuntime|_ThreadID=26;_ThreadName=Thread-1;|New instance of JRuby runtime created in 2,321 milliseconds|#]

[#|2010-01-15T11:00:41.355+0100|SEVERE|glassfishv3.0|org.glassfish.scripting.jruby.JRubyContainer|_ThreadID=26;_ThreadName=Thread-1;|library `socket' could not be loaded: java.lang.LinkageError: loader (instance of java/net/URLClassLoader): attempted duplicate class definition for name: "org/jruby/ext/socket/RubySocket"
        from /opt/redmine-0.9/vendor/rails/railties/lib/initializer.rb:134:in `process'
        from /opt/redmine-0.9/vendor/rails/railties/lib/initializer.rb:113:in `run'
        from /opt/redmine-0.9/config/environment.rb:20
        from /opt/redmine-0.9/config/environment.rb:31:in `require'
        from /opt/glassfishv3/glassfish/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98:in `load_application'
        from file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75:in `initialize'
        from file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in `new'
        from file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in `new'
        from <script>:1

/opt/redmine-0.9/vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks': library `socket' could not be loaded: java.lang.LinkageError: loader (instance of java/net/URLClassLoader): attempted duplicate class definition for name: "org/jruby/ext/socket/RubySocket" (RuntimeError)
        from /opt/redmine-0.9/vendor/rails/railties/lib/initializer.rb:134:in `process'
        from /opt/redmine-0.9/vendor/rails/railties/lib/initializer.rb:113:in `run'
        from /opt/redmine-0.9/config/environment.rb:20
        from /opt/redmine-0.9/config/environment.rb:31:in `require'
        from /opt/glassfishv3/glassfish/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98:in `load_application'
        from file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75:in `initialize'
        from file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in `new'
        from file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in `new'
        from <script>:1
        ...internal jruby stack elided...
        from Rails::Initializer.require_frameworks(/opt/redmine-0.9/vendor/rails/railties/lib/initializer.rb:134)
        from Rails::Initializer.process(/opt/redmine-0.9/vendor/rails/railties/lib/initializer.rb:113)
        from #<Class:01x675c9915>.run(/opt/redmine-0.9/config/environment.rb:20)
        from (unknown).(unknown)(/opt/redmine-0.9/config/environment.rb:31)
        from Kernel.require(/opt/glassfishv3/glassfish/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
        from Kernel.require(file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98)
        from Rack::Adapter::Rails.load_application(file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75)
        from Rack::Adapter::Rails.initialize(file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25)
        from (unknown).new(file:/opt/glassfishv3/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25)
        from #<Class:01x2670d85b>.new(<script>:1)
        from (unknown).(unknown)(:1)
|#]

[#|2010-01-15T11:00:47.975+0100|SEVERE|glassfishv3.0|org.glassfish.scripting.jruby.JRubyContainer|_ThreadID=27;_ThreadName=Thread-1;|Failed to create JRuby instance.|#]

[#|2010-01-15T11:00:54.946+0100|SEVERE|glassfishv3.0|org.glassfish.scripting.jruby.JRubyContainer|_ThreadID=28;_ThreadName=Thread-1;|Failed to create JRuby instance.|#]

[#|2010-01-15T11:00:58.542+0100|SEVERE|glassfishv3.0|org.glassfish.scripting.jruby.JRubyContainer|_ThreadID=27;_ThreadName=Thread-1;|Failed to create JRuby instance.|#]

[#|2010-01-15T11:01:07.652+0100|SEVERE|glassfishv3.0|org.glassfish.scripting.jruby.JRubyContainer|_ThreadID=28;_ThreadName=Thread-1;|Failed to create JRuby instance.|#]

[#|2010-01-15T11:01:15.817+0100|SEVERE|glassfishv3.0|org.glassfish.scripting.jruby.JRubyContainer|_ThreadID=27;_ThreadName=Thread-1;|Failed to create JRuby instance.|#]


Could anyone tell me please what is wrong? When I tried to run redmine via command :
jruby script/server webrick -e production,
everything was working fine.

Enviroment : Centos 5.4 64bit, jre 1.6 u18,glassfish v3. redmine 0.9
[Message sent by forum member 'jherkel' (j.herkel_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=381166