我有一个 Rails 3 应用程序,它使用 Warbler 打包到一个 war 文件中并部署到 Weblogic 11g。我正在通过控制台 Web 应用程序部署战争。当我尝试访问应用程序时失败,在下面生成堆栈跟踪。但是,如果我将应用程序解包部署(提取失败的相同 war 文件),它会完美运行。
环境:
- Ubuntu 12.04
- JDK (1.7.0_06-b24)
- Weblogic 11g (10.3.6)
- 导轨 (3.2.8)
- 莺 (1.3.6)
- jruby (1.6.7.2)
堆栈跟踪
<Sep 14, 2012 12:55:25 PM CDT> <Error> <ServletContext-/ruby-px> <BEA-000000> <ERROR: application error
org.jruby.rack.RackInitializationException: can't dup NilClass
from classpath:/META-INF/jruby.home/lib/ruby/1.9/pathname.rb:215:in `initialize'
from classpath:/jruby/rack/rails/railtie.rb:16:in `Railtie'
from org/jruby/RubyProc.java:258:in `call'
from /home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/gems/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
from /home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/gems/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks'
from org/jruby/RubyArray.java:1615:in `each'
from /home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/gems/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/gems/gems/railties-3.2.8/lib/rails/application.rb:67:in `inherited'
from /home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/config/application.rb:13:in `RubyPx'
from /home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/config/application.rb:12:in `(root)'
from org/jruby/RubyKernel.java:1042:in `require'
from /home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/config/application.rb:2:in `(root)'
from org/jruby/RubyKernel.java:1042:in `require'
from /home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/config/environment.rb:23:in `load_environment'
from classpath:/jruby/rack/rails_booter.rb:65:in `load_environment'
from <script>:1:in `(root)'
at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:231)
at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:58)
at org.jruby.rack.PoolingRackApplicationFactory.createApplication(PoolingRackApplicationFactory.java:323)
at org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:171)
at org.jruby.rack.DefaultRackDispatcher.getApplication(DefaultRackDispatcher.java:27)
Truncated. see log file for complete stacktrace
Caused By: org.jruby.exceptions.RaiseException: (TypeError) can't dup NilClass
at org.jruby.RubyKernel.dup(org/jruby/RubyKernel.java:1911)
at Pathname.initialize(classpath:/META-INF/jruby.home/lib/ruby/1.9/pathname.rb:215)
at (Anonymous).Railtie(classpath:/jruby/rack/rails/railtie.rb:16)
at org.jruby.RubyProc.call(org/jruby/RubyProc.java:258)
at (Anonymous).execute_hook(/home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/gems/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:34)
Truncated. see log file for complete stacktrace
>
<Sep 14, 2012 12:55:30 PM CDT> <Error> <ServletContext-/ruby-px> <BEA-000000> <ERROR: couldn't handle error
org.jruby.exceptions.RaiseException: (TypeError) can't convert nil into String
at org.jruby.RubyFile.join(org/jruby/RubyFile.java:1496)
at org.jruby.RubyFile.join(org/jruby/RubyFile.java:1518)
at File._call(/home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/gems/gems/rack-1.4.1/lib/rack/file.rb:55)
at File.call(/home/scott/wls_domains/PartnersXpress/servers/myserver/tmp/_WL_user/ruby-px/iikl7j/war/WEB-INF/gems/gems/rack-1.4.1/lib/rack/file.rb:30)
at Errors.response_content(classpath:/jruby/rack/errors.rb:37)
Truncated. see log file for complete stacktrace
编辑:添加了 JDK 版本。