Warble JAR在Tomcat 6上无法正常运行的问题,在Webrick上正常运行

时间:2011-09-28 22:37:31

标签: tomcat jruby war webrick

我对Jruby有点新鲜 - 到目前为止我使用warble并为我的Jruby制造战争没有任何问题。现在,当我尝试部署创建的战争时,我在日志中看到此错误,我不确定100%如何修复。请帮忙。

以下日志出错:

load error: sqlite3/sqlite3_native -- java.lang.UnsatisfiedLinkError: failed to load shim library, error: dlopen(/tomcat6-1/bin/file:/tomcat6-1/webapps/ROOT/WEB-INF/lib/jruby-stdlib-1.6.3.jar!/META-INF/jruby.home/META-INF/jruby.homeDarw
in/libjruby-cext.jnilib, 10): image not found
--- System
jruby 1.6.3 (ruby-1.8.7-p330) (2011-07-07 965162f) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_26) [darwin-x86_64-java]
Time: Wed Sep 28 16:26:29 -0600 2011
Server: Apache Tomcat/6.0.32
jruby.home: file:/tomcat6-1/webapps/ROOT/WEB-INF/lib/jruby-stdlib-1.6.3.jar!/META-INF/jruby.home

--- Context Init Parameters:
public.root = /
rails.env = production

--- Backtrace
LoadError: load error: sqlite3/sqlite3_native -- java.lang.UnsatisfiedLinkError: failed to load shim library, error: dlopen(/tomcat6-1/bin/file:/tomcat6-1/webapps/ROOT/WEB-INF/lib/jruby-stdlib-1.6.3.jar!/META-INF/jruby.home/META-INF/jru
by.homeDarwin/libjruby-cext.jnilib, 10): image not found
           require at org/jruby/RubyKernel.java:1038
           require at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239
   load_dependency at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225
  new_constants_in at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596
  new_constants_in at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:595
   load_dependency at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225
           require at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239
            (root) at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/sqlite3-1.3.4/lib/sqlite3.rb:6
           require at org/jruby/RubyKernel.java:1038
           require at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/sqlite3-1.3.4/lib/sqlite3.rb:68
              each at org/jruby/RubyArray.java:1603
           require at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/bundler-1.0.15/lib/bundler/runtime.rb:66
              each at org/jruby/RubyArray.java:1603
           require at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/bundler-1.0.15/lib/bundler/runtime.rb:55
           require at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/bundler-1.0.15/lib/bundler.rb:120
            (root) at /tomcat6-1/webapps/ROOT/WEB-INF/config/application.rb:7
           require at org/jruby/RubyKernel.java:1038
           require at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239
   load_dependency at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225
  new_constants_in at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596
  new_constants_in at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:595
   load_dependency at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225
           require at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239
            (root) at /tomcat6-1/webapps/ROOT/WEB-INF/config/application.rb:2
           require at org/jruby/RubyKernel.java:1038
           require at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239
   load_dependency at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225
  new_constants_in at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596
  new_constants_in at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:595
   load_dependency at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225
           require at /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239
  load_environment at /tomcat6-1/webapps/ROOT/WEB-INF/config/environment.rb:169
            to_app at file:/tomcat6-1/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.9.jar!/jruby/rack/rails.rb:173
               new at file:/tomcat6-1/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.9.jar!/jruby/rack/rails.rb:193
            (root) at <web.xml>:1
     instance_eval at org/jruby/RubyKernel.java:2061
        initialize at file:/tomcat6-1/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.9.jar!/vendor/rack-1.2.2/rack/builder.rb:46
            (root) at <web.xml>:1




--- RubyGems
Gem.dir: /tomcat6-1/webapps/ROOT/WEB-INF/gems
Gem.path:
/tomcat6-1/webapps/ROOT/WEB-INF/gems
Activated gems:
  bundler-1.0.15
  rake-0.9.2
  abstract-1.0.0
  activesupport-3.0.9
  builder-2.1.2
  i18n-0.5.0
  activemodel-3.0.9
  erubis-2.6.6
  rack-1.2.3
  rack-mount-0.6.14
  rack-test-0.5.7
  tzinfo-0.3.29
  actionpack-3.0.9
  mime-types-1.16
  polyglot-0.3.2
  treetop-1.4.10
  mail-2.2.19
  actionmailer-3.0.9
  arel-2.0.10
  activerecord-3.0.9
  activeresource-3.0.9
  rdoc-3.9.1
  thor-0.14.6
  railties-3.0.9
  rails-3.0.9
  sqlite3-1.3.4

--- Bundler
Bundler.bundle_path: /tomcat6-1/webapps/ROOT/WEB-INF/gems
Bundler.root: /tomcat6-1/webapps/ROOT/WEB-INF
Gemfile: Gemfile
Settings:
  without = development:test
  gemfile = Gemfile
  bin_path = /tomcat6-1/webapps/ROOT/WEB-INF/gems/gems/bundler-1.0.15/bin/bundle

--- JRuby-Rack Config
background_spooling = false
compat_version =
filter_adds_html = true
filter_verifies_resource = false
ignore_environment = false
initial_runtimes =
jms_connection_factory =
jms_jndi_properties =
logger = org.jruby.rack.logging.ServletContextLogger@19af2a9c
logger_class_name = servlet_context
logger_name = jruby.rack
maximum_runtimes =
memory_buffer_size = 65536
num_initializer_threads =
rackup =
rackup_path =
rewindable = true
runtime_timeout_seconds =
serial_initialization = false
servlet_context = org.apache.catalina.core.ApplicationContextFacade@1181a6d

如果我还能提供其他任何内容,请告诉我。

感谢您的帮助! 丹尼尔

1 个答案:

答案 0 :(得分:0)

我在发布后不久就想到了这一点 - 似乎一个问题变得混乱,我在这里发布的问题围绕着试图在Jruby中运行一个ruby原生扩展。

问题解决后,需要使用Gems切换。