glassfish_at_javadesktop.org wrote:
> So the rails upgrade resolved my orginal problem. But now I see the error the original poster described.
>
> I turned on verbose logging for class loading and indeed the RubySocket class is being loaded twice during the app server startup:
>
> # grep RubySocket glassfishv3/glassfish/domains/mediacast/logs/jvm.log
> [Loaded org.jruby.ext.socket.RubySocket$Service from file:/app/mediacast/jruby-1.4.0/lib/jruby.jar]
> [Loaded org.jruby.ext.socket.RubySocket from file:/app/mediacast/jruby-1.4.0/lib/jruby.jar]
> [Loaded org.jruby.ext.socket.RubySocket from file:/app/mediacast/jruby-1.4.0/lib/jruby.jar]
>
> I can reproduce the issue with JRuby 1.20, 1.3.1 and 1.4.0, rails 2.3.5, rack 1.0.1, SGES v3, jdk 6u18, OpenSolaris 2009.06.
>
>
I think QA runs ruby tests on SGES v3 as well. I have seen such error
due to osgi related issue. Can you try by cleaning the osgi cache:
'rm -rf domains/domain1/osgi-cache'?
I just installed sges v3 on my mbp and deployed different versions of
rails+jruby apps (jruby 1.3.1+rails 2.2.2, jruby 1.4+rails 2.3.5) and
all seem to work just fine. Can you reproduce with a simple rails app?
We need a reproducible testcase.
> Please note that I'm using SGES v3 distro and not the community gf v3 distro. I don't know if it makes a difference, but the same app deploys just fine on gf v3 on my laptop, I wonder if there is a significant difference between the two distributions. I'm gonna try installing gf v3 on my server.
>
>
I dont think there is difference between the sges v3 and community
release as far as specific bits are concerned. I will need to check on
this with relevant folks.
-vivek.
> This is my stack trace:
>
> /app/mediacast/mediacast-2.3.2/config/../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 /app/mediacast/mediacast-2.3.2/config/../vendor/rails/railties/lib/initializer.rb:134:in `process'
> from /app/mediacast/mediacast-2.3.2/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
> from /app/mediacast/mediacast-2.3.2/config/environment.rb:22
> from /app/mediacast/mediacast-2.3.2/config/environment.rb:31:in `require'
> from /app/mediacast/jruby-1.3.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
> from file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98:in `load_application' from file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75:in `initialize'
> from file:/app/mediacast/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(/app/mediacast/mediacast-2.3.2/config/../vendor/rails/railties/lib/initializer.rb:1
> 34)
> from Rails::Initializer.process(/app/mediacast/mediacast-2.3.2/config/../vendor/rails/railties/lib/initializer.rb:113) from #<Class:01xcbd22a>.run(/app/mediacast/mediacast-2.3.2/config/environment.rb:22)
> from (unknown).(unknown)(/app/mediacast/mediacast-2.3.2/config/environment.rb:31) from Kernel.require(/app/mediacast/jruby-1.3.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
> from Kernel.require(file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98)
> from Rack::Adapter::Rails.load_application(file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/r
> ails.rb:75)
> from Rack::Adapter::Rails.initialize(file:/app/mediacast/glassfishv3/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:
> 25) from #<Class:01xcc357d>.new(<script>:1)
> from (unknown).(unknown)(:1)
> |#]
> [Message sent by forum member 'iminar' (iiminar_at_gmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=381299
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>