Jruby error message

Hi, this is my first attempt at doing a ruby on rails project but i
can’t even get started, i am trying to run glassfish 3 at the moment and
get this error code in the log file

S
SEVERE: 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 C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:134:inprocess’
from C:/Program Files/NetBeans
6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in
run' from C:/Users/xxx/Documents/NetBeansProjects/RailsApplication3/config/environment.rb:9 from C:/Users/xxx/Documents/NetBeansProjects/RailsApplication3/config/environment.rb:31:inrequire’
from C:/Program Files/NetBeans
6.9.1/ruby/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from file:/C:/Program Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98:inload_application’
from file:/C:/Program
Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75:in
initialize' from file:/C:/Program Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:innew’
from file:/C:/Program
Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in
`new’
from :1

SEVERE: 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 C:/Program Files/NetBeans 6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:134:inprocess’
from C:/Program Files/NetBeans
6.9.1/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in
run' from C:/Users/xxx/Documents/NetBeansProjects/RailsApplication3/config/environment.rb:9 from C:/Users/xxx/Documents/NetBeansProjects/RailsApplication3/config/environment.rb:31:inrequire’
from C:/Program Files/NetBeans
6.9.1/ruby/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from file:/C:/Program Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98:inload_application’
from file:/C:/Program
Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75:in
initialize' from file:/C:/Program Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:innew’
from file:/C:/Program
Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in
`new’
from :1

   from

#Class:01xce6965.run(C:/Users/xxx/Documents/NetBeansProjects/RailsApplication3/config/environment.rb:9)
from
(unknown).(unknown)(C:/Users/xxx/Documents/NetBeansProjects/RailsApplication3/config/environment.rb:31)
from Kernel.require(C:/Program Files/NetBeans
6.9.1/ruby/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
from Kernel.require(file:/C:/Program
Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98)
from Rack::Adapter::Rails.load_application(file:/C:/Program
Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75)
from Rack::Adapter::Rails.initialize(file:/C:/Program
Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25)
from (unknown).new(file:/C:/Program
Files/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25)
from #Class:01x1733273.new(:1)
from (unknown).(unknown)(:1)

SEVERE: Failed to create JRuby instance.
SEVERE: Failed to create JRuby instance.

Is there a way around this error problem

Any help

Please

sarah

On Jan 6, 2011, at 3:08 PM, Sarah Ww wrote:

Hi, this is my first attempt at doing a ruby on rails project but i
can’t even get started, i am trying to run glassfish 3 at the moment and
get this error code in the log file

S
SEVERE: 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”

This is a common problem with jruby and using java version > 1.6.0_17.
We actually have to make sure we keep a back copy of java just to get
our stuff working correctly.

Try that out (back port your java if it is greater than build 17).

HTH.

Robert W.
Senior Software Developer
EXTENSION, INC.
Email: [email protected]
Office: 260-797-0200 x4228
General: 877-207-3753

Visit us at HIMSS11 - Booth # 1773
Contact us at [email protected] to pre-schedule a demo!