Monthly Archives: October 2014

Gradle libnative-platform.so error on Jenkins

Gradle wanted to create libnative-platform.so in /usr/share/tomcat7/.gradle/native/jna/linux-amd64/libjnidispatch.so, which is the home directory of Tomcat. Choosing “Force GRADLE_USER_HOME to use workspace” resolved this issue.

[workspace] $ /srv/jenkins/tools/hudson.plugins.gradle.GradleInstallation/Gradle_2.1/bin/gradle --debug build
04:05:25.131 [DEBUG] [org.gradle.internal.nativeplatform.services.NativeServices] Unable to initialize native-platform. Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library 'libnative-platform.so' for Linux amd64.
caused by: java.io.IOException: No such file or directory
04:05:29.541 [ERROR] [org.gradle.BuildExceptionReporter] 
04:05:29.544 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
04:05:29.545 [ERROR] [org.gradle.BuildExceptionReporter] 
04:05:29.546 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
04:05:29.546 [ERROR] [org.gradle.BuildExceptionReporter] Could not create an instance of type org.gradle.invocation.DefaultGradle_Decorated.
04:05:29.571 [ERROR] [org.gradle.BuildExceptionReporter] 
04:05:29.573 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
04:05:29.574 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 
Build step 'Invoke Gradle script' changed build result to FAILURE