2012-07-13 93 views
0

我已經在Torquebox上部署了我的Ruby on Rails應用程序。 啓動服務器後我收到此錯誤在Jruby應用程序中加載java類時出錯

10:18:06,311 ERROR [org.torquebox.core.runtime] (Thread-95) Error during execution: ENV['RAILS_ROOT']=RACK_ROOT 
ENV['RAILS_ENV']=RACK_ENV 
require %q(org/torquebox/web/rails/boot) 
: org.jruby.exceptions.RaiseException: (NameError) cannot load Java class sun.security.tools.KeyTool 
     at org.jruby.javasupport.JavaClass.for_name(org/jruby/javasupport/JavaClass.java:1205) [jruby.jar:] 
     at org.jruby.javasupport.JavaUtilities.get_proxy_class(org/jruby/javasupport/JavaUtilities.java:34) [jruby.jar:] 
     at Object.java_import(/opt/torquebox/current/jruby/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/object.rb:46) at Module.Tomcat(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/trinidad_jars-1.0.3/lib/trinidad/jars.rb:20)  at (Anonymous).Trinidad(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/trinidad_jars-1.0.3/lib/trinidad/jars.rb:10)  at (Anonymous).(root)(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/trinidad_jars-1.0.3/lib/trinidad/jars.rb:5) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1033) [jruby.jar:] 
     at (Anonymous).(root)(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/trinidad_jars-1.0.3/lib/trinidad/jars.rb:10) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1033) [jruby.jar:] 
     at Runtime.require(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/trinidad-1.3.5/lib/trinidad.rb:68)  at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1615) [jruby.jar:] 
     at Runtime.require(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:66) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1615) [jruby.jar:] 
     at Runtime.require(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:55) at (Anonymous).require(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:119)  at (Anonymous).(root)(/usr/share/reposiotry/Purple-Hills/config/application.rb:18)  at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1033) [jruby.jar:] 
     at (Anonymous).(root)(/usr/share/reposiotry/Purple-Hills/config/application.rb:2)  at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1058) [jruby.jar:] 
     at (Anonymous).(root)(/usr/share/reposiotry/Purple-Hills/config/environment.rb:109)  at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1033) [jruby.jar:] 
     at (Anonymous).(root)(file:/opt/torquebox/current/jboss/modules/org/torquebox/web/main/torquebox-web.jar!/org/torquebox/web/rails/boot.rb:3) 
10:18:06,362 ERROR [org.torquebox.core.runtime] (Thread-95) Failed to initialize runtime: : org.jruby.exceptions.RaiseException: (NameError) cannot load Java class sun.security.tools.KeyTool 
     at org.jruby.javasupport.JavaClass.for_name(org/jruby/javasupport/JavaClass.java:1205) [jruby.jar:] 
     at org.jruby.javasupport.JavaUtilities.get_proxy_class(org/jruby/javasupport/JavaUtilities.java:34) [jruby.jar:] 
     at Object.java_import(/opt/torquebox/current/jruby/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/object.rb:46) at Module.Tomcat(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/trinidad_jars-1.0.3/lib/trinidad/jars.rb:20)  at (Anonymous).Trinidad(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/trinidad_jars-1.0.3/lib/trinidad/jars.rb:10)  at (Anonymous).(root)(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/trinidad_jars-1.0.3/lib/trinidad/jars.rb:5) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1033) [jruby.jar:] 
     at (Anonymous).(root)(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/trinidad_jars-1.0.3/lib/trinidad/jars.rb:10) at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1033) [jruby.jar:] 
     at Runtime.require(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/trinidad-1.3.5/lib/trinidad.rb:68)  at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1615) [jruby.jar:] 
     at Runtime.require(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:66) at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1615) [jruby.jar:] 
     at Runtime.require(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:55) at (Anonymous).require(/opt/torquebox/current/jruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:119)  at (Anonymous).(root)(/usr/share/reposiotry/Purple-Hills/config/application.rb:18)  at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1033) [jruby.jar:] 
     at (Anonymous).(root)(/usr/share/reposiotry/Purple-Hills/config/application.rb:2)  at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1058) [jruby.jar:] 
     at (Anonymous).(root)(/usr/share/reposiotry/Purple-Hills/config/environment.rb:109)  at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1033) [jruby.jar:] 
     at (Anonymous).(root)(file:/opt/torquebox/current/jboss/modules/org/torquebox/web/main/torquebox-web.jar!/org/torquebox/web/rails/boot.rb:3) 
10:18:06,385 INFO [org.torquebox.core.runtime] (Thread-95) Created ruby runtime (ruby_version: RUBY1_8, compile_mode: JIT, app: Purple-Hills, context: web) in 29.45s 

回答

2

它看起來像你在你的Gemfile特立尼達寶石。這個寶石在TorqueBox下是不需要的,並且可能無法正確加載。嘗試刪除特立尼達作爲依賴,並看看是否有幫助。如果沒有,請在irc(freenode上的#torquebox)或mailing list上看到我們,我們會幫助您。

+0

謝謝Tobias。有用 !! – 2012-07-14 09:37:01

相關問題