Using ffi from jruby-maven-plugins fails under 1.6.0.RC2 (works with 1.5.6)
---------------------------------------------------------------------------

                 Key: JRUBY-5482
                 URL: http://jira.codehaus.org/browse/JRUBY-5482
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6RC2
            Reporter: bob mcwhirter
            Assignee: Thomas E Enebo


A strange combination of jruby-maven-plugin and JRuby 1.6.0.RC2 using FFI fails 
now, where it worked using JRuby 1.5.6.

{noformat}
[WARNING] org/jruby/RubyKernel.java:1038:in `require': Could not load FFI 
Provider: (NotImplementedError) FFI not available: Could not initialize class 
com.kenai.jffi.Foreign$InstanceHolder (LoadError)
[WARNING]  See http://jira.codehaus.org/browse/JRUBY-4583
[WARNING]       from 
file:/Users/bob/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 `require'
[WARNING]       from 
file:/Users/bob/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/ffi/ffi.rb:69:in
 `(root)'
[WARNING]       from org/jruby/RubyKernel.java:1038:in `require'
[WARNING]       from 
file:/Users/bob/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 `require'
[WARNING]       from 
file:/Users/bob/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/ffi/ffi.rb:1:in
 `(root)'
[WARNING]       from org/jruby/RubyKernel.java:1038:in `require'
[WARNING]       from 
file:/Users/bob/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 `require'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/target/rubygems/gems/ffi-0.6.3-java/lib/ffi.rb:10:in
 `(root)'
[WARNING]       from org/jruby/RubyKernel.java:1038:in `require'
[WARNING]       from 
file:/Users/bob/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 `require'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/target/rubygems/gems/nokogiri-1.4.4.2-java/lib/nokogiri.rb:2:in
 `(root)'
[WARNING]       from org/jruby/RubyKernel.java:1038:in `require'
[WARNING]       from 
file:/Users/bob/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 `require'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/target/rubygems/gems/capybara-0.4.0/lib/capybara.rb:1:in
 `(root)'
[WARNING]       from org/jruby/RubyKernel.java:1038:in `require'
[WARNING]       from 
file:/Users/bob/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
 `require'
[WARNING]       from 
file:/Users/bob/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 `require'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/target/rubygems/gems/capybara-0.4.0/lib/capybara/dsl.rb:2:in
 `(root)'
[WARNING]       from org/jruby/RubyKernel.java:1038:in `require'
[WARNING]       from 
file:/Users/bob/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
 `require'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/spec/spec_helper.rb:1:in 
`(root)'
[WARNING]       from org/jruby/RubyKernel.java:1063:in `load'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/spec/backgroundable_spec.rb:388:in
 `load_spec_files'
[WARNING]       from org/jruby/RubyArray.java:2458:in `collect'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/target/rubygems/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:388:in
 `load_spec_files'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/target/rubygems/gems/rspec-core-2.3.1/lib/rspec/core/command_line.rb:18:in
 `run'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/target/rubygems/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:55:in
 `run_in_process'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/target/rubygems/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:46:in
 `run'
[WARNING]       from 
/Users/bob/torquebox/torquebox/integration-tests/target/rspec-runner.rb:403:in 
`(root)'
[WARNING]       from org/jruby/RubyKernel.java:1063:in `load'
[WARNING]       from -e:1:in `(root)'
[INFO] ----------------------------------------------
{noformat}

If the same script is executed outside of the context of maven, this error is 
avoided.

The maven process does not fork the jruby that is running 
rspec+capybara+ffi+nokogiri, but runs it in-process.

Having maven run the ruby with fork=true does not improve the situation, oddly.

I will attempt to work up a small test project for your experimentation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to