开发者

Issue with Warble JAR not running correctly on Tomcat 6, runs fine on Webrick

开发者 https://www.devze.com 2023-04-09 19:18 出处:网络
I am somewhat new to Jruby - up to this point I have had no problem using warble and building a war for my Jruby.Now when I try to deploy the created war I see this error in the logs and I am not sure

I am somewhat new to Jruby - up to this point I have had no problem using warble and building a war for my Jruby. Now when I try to deploy the created war I see this error in the logs and I am not sure 100% how to fix. Please help.

Error in logs below:

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

Please let me know if there is anything else I can provide.

Thank you for your help! Daniel


I figured this out shortly after posting - seems an issue was getting confused and the issue I posted here revolved around trying to run in Jruby a ruby native extension.

Issue resolved, after switching out with Gems were needed.

0

精彩评论

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

关注公众号