Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load FFI Provider: (NotImplementedError) FFI not available: null #37

Closed
ballinascreen opened this issue Feb 26, 2015 · 3 comments

Comments

@ballinascreen
Copy link

Folks,

I've been struggling for the past day or so to try and integrate this plugin with my Gradle build environment - with limited success. After initially failing to get it to work with my existing Gradle project, I decided to keep things simple and create a new/pristine Gradle project with only the following configuration in the build.gradle file:

apply plugin: 'com.github.robfletcher.compass'

buildscript {
    repositories {
        mavenLocal()
        maven { url "https://my.internal.repo.proxy.server/artifactory/libs-release" }
    }
    dependencies {
        classpath 'com.github.robfletcher:compass-gradle-plugin:2.0.5'
    }
}

repositories {
    mavenLocal()
    maven { url "https://my.internal.repo.proxy.server/artifactory/libs-release" }
}

We use an internal Artifactory repository server/proxy to retrieve external packages for us and I can see the various gradle-compass, jruby and rubygem packages download as expected.

Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/robfletcher/compass-gradle-plugin/2.0.5/compass-gradle-plugin-2.0.5.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jengelman/gradle/plugins/gradle-processes/0.3.0/gradle-processes-0.3.0.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jruby-gradle/jruby-gradle-plugin/0.1.9/jruby-gradle-plugin-0.1.9.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/jruby-complete/1.7.15/jruby-complete-1.7.15.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/jruby-artifacts/1.7.15/jruby-artifacts-1.7.15.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/jruby-parent/1.7.15/jruby-parent-1.7.15.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/bouncycastle/bcprov-jdk15on/1.50/bcprov-jdk15on-1.50.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/jruby-core/1.7.15/jruby-core-1.7.15.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/jruby-stdlib/1.7.15/jruby-stdlib-1.7.15.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm/4.0/asm-4.0.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm-parent/4.0/asm-parent-4.0.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/ow2/1.3/ow2-1.3.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm-commons/4.0/asm-commons-4.0.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm-analysis/4.0/asm-analysis-4.0.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm-util/4.0/asm-util-4.0.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/joni/joni/2.1.2/joni-2.1.2.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-netdb/1.1.2/jnr-netdb-1.1.2.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-enxio/0.4/jnr-enxio-0.4.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-unixsocket/0.3/jnr-unixsocket-0.3.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-posix/3.0.6/jnr-posix-3.0.6.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/extras/bytelist/1.0.11/bytelist-1.0.11.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-constants/0.8.5/jnr-constants-0.8.5.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/jcodings/jcodings/1.0.10/jcodings-1.0.10.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-ffi/1.0.10/jnr-ffi-1.0.10.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jffi/1.2.7/jffi-1.2.7.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/jcraft/jzlib/1.1.2/jzlib-1.1.2.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/sonatype/oss/oss-parent/6/oss-parent-6.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/headius/invokebinder/1.2/invokebinder-1.2.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/martiansoftware/nailgun-server/0.9.1/nailgun-server-0.9.1.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/martiansoftware/nailgun-all/0.9.1/nailgun-all-0.9.1.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/yecht/1.0/yecht-1.0.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/joda-time/joda-time/2.3/joda-time-2.3.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/headius/options/1.2/options-1.2.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm-tree/4.0/asm-tree-4.0.pom
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/jruby-complete/1.7.15/jruby-complete-1.7.15.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/bouncycastle/bcprov-jdk15on/1.50/bcprov-jdk15on-1.50.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/jruby-core/1.7.15/jruby-core-1.7.15.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/jruby-stdlib/1.7.15/jruby-stdlib-1.7.15.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm/4.0/asm-4.0.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm-commons/4.0/asm-commons-4.0.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm-analysis/4.0/asm-analysis-4.0.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm-util/4.0/asm-util-4.0.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/joni/joni/2.1.2/joni-2.1.2.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-netdb/1.1.2/jnr-netdb-1.1.2.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-enxio/0.4/jnr-enxio-0.4.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-unixsocket/0.3/jnr-unixsocket-0.3.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-posix/3.0.6/jnr-posix-3.0.6.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/extras/bytelist/1.0.11/bytelist-1.0.11.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-constants/0.8.5/jnr-constants-0.8.5.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/jcodings/jcodings/1.0.10/jcodings-1.0.10.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jnr-ffi/1.0.10/jnr-ffi-1.0.10.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jffi/1.2.7/jffi-1.2.7.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/github/jnr/jffi/1.2.7/jffi-1.2.7-native.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/yaml/snakeyaml/1.13/snakeyaml-1.13.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/jcraft/jzlib/1.1.2/jzlib-1.1.2.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/headius/invokebinder/1.2/invokebinder-1.2.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/martiansoftware/nailgun-server/0.9.1/nailgun-server-0.9.1.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/jruby/yecht/1.0/yecht-1.0.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/joda-time/joda-time/2.3/joda-time-2.3.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/com/headius/options/1.2/options-1.2.jar
Download https://my.internal.repo.proxy.server/artifactory/libs-release/org/ow2/asm/asm-tree/4.0/asm-tree-4.0.jar
Download http://rubygems-proxy.torquebox.org/releases/rubygems/compass/1.0.3/compass-1.0.3.gem
Download http://rubygems-proxy.torquebox.org/releases/rubygems/sass/3.4.12/sass-3.4.12.gem
Download http://rubygems-proxy.torquebox.org/releases/rubygems/compass-core/1.0.3/compass-core-1.0.3.gem
Download http://rubygems-proxy.torquebox.org/releases/rubygems/compass-import-once/1.0.5/compass-import-once-1.0.5.gem
Download http://rubygems-proxy.torquebox.org/releases/rubygems/chunky_png/1.3.4/chunky_png-1.3.4.gem
Download http://rubygems-proxy.torquebox.org/releases/rubygems/rb-fsevent/0.9.4/rb-fsevent-0.9.4.gem
Download http://rubygems-proxy.torquebox.org/releases/rubygems/rb-inotify/0.9.5/rb-inotify-0.9.5.gem
Download http://rubygems-proxy.torquebox.org/releases/rubygems/multi_json/1.10.1/multi_json-1.10.1.gem
Download http://rubygems-proxy.torquebox.org/releases/rubygems/ffi/1.9.6/ffi-1.9.6.gem

When I then initiate a simple 'compassVersion' task (either in Eclipse STS or via Gradle at the CLI) I eventually get the following:

:compassVersionERROR:  Loading command: install (LoadError)
    Could not load FFI Provider: (NotImplementedError) FFI not available: null
 See http://jira.codehaus.org/browse/JRUBY-4583
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
FAILED

I've had a look at the referenced JIRA ticket, although this appears to relate to JRuby 1.5.x and since I'm running on an x64 Windows based system I didn't think this issue would affect me. Just wondering if I'm missing something obvious. Some additional info about my environment:

OS: Windows 8.1 x64
Java: JDK 1.8.0_31-b13
Gradle: 2.3

Regards,

Shane

@ballinascreen
Copy link
Author

FYI:

I've also repeated the process on a Windows 7.1 (64-bit) performing a clean install of Eclipse and Java, however the end result was the same. I also tried adding a runtime dependency on the jffi native library as suggested here (https://www.ruby-forum.com/topic/4414925) but with no luck here either :(

e.g.:

dependencies {
    runtime("com.github.jnr:jffi:1.2.7:native@jar")
}

@kakusuke
Copy link

In my case, jruby updating solves this problem.

My build.gradle is following:

buildscript {
  repositories {
    jcenter()
  }
  dependencies {
    classpath "com.github.robfletcher:compass-gradle-plugin:2.0.5"
    classpath "com.github.jruby-gradle:jruby-gradle-plugin:0.1.12"
  }
}
apply plugin: "com.github.robfletcher.compass"

@ballinascreen
Copy link
Author

@kakusuke Yes indeed - that did the trick!

Thanks!

Shane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants