tomcat - Warble JAR 在 Tomcat 6 上运行不正常的问题,在 Webrick 上运行良好

标签 tomcat jruby war webrick

我对 Jruby 有点陌生 - 到目前为止,我在使用 warble 和为我的 Jruby 建立 war 方面没有遇到任何问题。现在,当我尝试部署创建的 war 时,我在日志中看到了这个错误,我 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

如果还有什么我可以提供的,请告诉我。

感谢您的帮助! 丹尼尔

最佳答案

我在发布后不久就想通了 - 似乎有一个问题变得困惑,我在这里发布的问题围绕着尝试在 Jruby 中运行一个 ruby​​ 原生扩展。

问题已解决,需要使用 Gems 进行切换。

关于tomcat - Warble JAR 在 Tomcat 6 上运行不正常的问题,在 Webrick 上运行良好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7590486/

相关文章:

eclipse - .war 文件不会更新

xml - Alfresco 模型跟踪错误

tomcat - 如何使用 IP 地址而不是本地主机访问我在 tomcat 服务器上运行的应用程序

rubygems - JRuby OpenSSL 错误

java - 为什么 ClassLoader 返回带有第二个无关感叹号的路径

java - 类文件到Java文件的转换

hibernate - java.lang.ClassNotFoundException : org. hibernate .HibernateException

java - 如何使最简单的 servlet 过滤器尊重设置的字符编码

ruby-on-rails - 是否可以在 Google App Engine 上使用 Ruby/jRuby/Java?

jruby - bundler 无法识别平台?找不到 gem