开发者

First project with NetBeans - Failed to create JRuby instance

I'm trying to learn Ruby on Rails so I installed NetBeans on my Mac. I'm just using a standard tutorial to write a blog app and followed the directions perfectly. However, when I click "Run", I get the following error:

Jan 28, 2011 9:12:32 AM com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Grizzly Framework 1.9.18-o started in: 165ms listening on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 4ms listening on port 4848
INFO: Grizzly Framework 1.9.18-o started in: 17ms listening on port 8181
INFO: Starting Grizzly Framework 1.9.18-o - Fri Jan 28 09:12:43 PST 2011
INFO: Grizzly Framework 1.9.18-o started in: 15ms listening on port 3700
INFO: Starting Grizzly Framework 1.9.18-o - Fri Jan 28 09:12:43 PST 2011
INFO: Grizzly Framework 1.9.18-o started in: 42ms listening on port 7676
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(9534ms) startup services(2418ms) total(11952ms)
INFO: Binding RMI port to *:8686
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://mac.kitchenpc.local:8686/jndi/rmi://mac.kitchenpc.local:8686/jmxrmi
INFO: Grizzly Framework 1.9.18-o started in: 41ms listening on port 8080
INFO: MNTG0107:Enabling the monitoring for all the stats with level = JRUBY-CONTAINER
INFO: interface org.glassfish.scripting.jruby.config.JrubyContainer
INFO: Running pgtest in development environment.
INFO: Rails application detected.
INFO: Loading application pgtest at /pgtest
INFO: JRuby version is: 1.5.1
INFO: pgtest was successfully deployed in 2,403 milliseconds.
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Grizzly Framework 1.9.18-o started in: 12ms listening on port 8181
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /Applications/NetBeans/glassfish-3.0.1/glassfish/modules/autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /var/folders/Yo/YoZ0GEx3F-izSCKnxBVAU++++TI/-Tmp-/fileinstall--635044837952681835, felix.fileinstall.filter = null}
INFO: New instance of JRuby runtime created in 4,409 milliseconds
INFO: Installed /Applications/NetBeans/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /Applications/NetBeans/glassfish-3.0.1/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /var/folders/Yo/YoZ0GEx3F-izSCKnxBVAU++++TI/-Tmp-/fileinstall-939562427652715173, felix.fileinstall.filter = null}
INFO: Installed /Applications/NetBeans/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.scr.jar
INFO: Installed /Applications/NetBeans/glassfish-3.0.1/glassfish/modules/autostart/osgi-web-container.jar
INFO: Started bundle: file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.scr.jar
INFO: Started bundle: file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/autostart/osgi-web-container.jar
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 /Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:134:in `process'
        开发者_运维知识库from /Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run'
        from /Users/Mike/NetBeansProjects/pgtest/config/environment.rb:9
        from /Users/Mike/NetBeansProjects/pgtest/config/environment.rb:31:in `require'
        from /Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98:in `load_application'
        from file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75:in `initialize'
        from file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in `new'
        from file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in `new'
        from <script>:1
/Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/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 /Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:134:in `process'
        from /Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run'
        from /Users/Mike/NetBeansProjects/pgtest/config/environment.rb:9
        from /Users/Mike/NetBeansProjects/pgtest/config/environment.rb:31:in `require'
        from /Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98:in `load_application'
        from file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75:in `initialize'
        from file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in `new'
        from file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25:in `new'
        from <script>:1
        ...internal jruby stack elided...
        from Rails::Initializer.require_frameworks(/Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:134)
        from Rails::Initializer.process(/Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113)
        from #<Class:01x72acf534>.run(/Users/Mike/NetBeansProjects/pgtest/config/environment.rb:9)
        from (unknown).(unknown)(/Users/Mike/NetBeansProjects/pgtest/config/environment.rb:31)
        from Kernel.require(/Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
        from Kernel.require(file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:98)
        from Rack::Adapter::Rails.load_application(file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:75)
        from Rack::Adapter::Rails.initialize(file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25)
        from (unknown).new(file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:25)
        from #<Class:01x500d2a4>.new(<script>:1)
        from (unknown).(unknown)(:1)

SEVERE: Failed to create JRuby instance.
SEVERE: Failed to create JRuby instance.
INFO: Total number of available updates : 1
INFO: Available updates : 
pkg-java 1.122,0-50.2809:20101215T183246Z Wed Dec 15 18:32:46 PST 2010


I haven't heard a single person ever say they used Glassfish for Rails but this link has a fix for your error that apparently works for some people:

http://jira.codehaus.org/browse/JRUBY-4785

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜