Gradle plugin for Jenkins fails : Failure: net.rubygrapefruit.platform.NativeException: Failed to initialise native integration.


(Venkat GV) #1

Fello Gradle users,

Did any one noticed the below issue ?

Gradle plugin for Jenkins fails : Failure: net.rubygrapefruit.platform.NativeException: Failed to initialise native integration.

  • /usr/gradle-1.4/bin/gradle test --debug

15:08:09.619 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@2df6df4c, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@2abe0e27, org.gradle.logging.internal.JavaUtilLoggingConfigurer@2393385d] 15:08:09.701 [DEBUG] [org.gradle.internal.nativeplatform.services.NativeServices] Unable to initialize native-platform. Failure: net.rubygrapefruit.platform.NativeException: Failed to initialise native integration. caused by: java.io.IOException: No such file or directory 15:08:09.715 [ERROR] [org.gradle.BuildExceptionReporter]

15:08:09.717 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build aborted because of an internal error. 15:08:09.718 [ERROR] [org.gradle.BuildExceptionReporter]

15:08:09.718 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 15:08:09.719 [ERROR] [org.gradle.BuildExceptionReporter] Build aborted because of an unexpected internal error. Please file an issue at: http://forums.gradle.org. Build step ‘Execute shell’ marked build as failure


(Peter Niederwieser) #2

Can you post the full stack trace (’-S’) as a Gist? Can you double-check that the Gradle process has write permissions for the project directory and Gradle user home?


(Venkat GV) #3

Thanks, Peter. I gave all permissions on these folders to everyone.

Here is the Gist link: https://gist.github.com/anonymous/4949923

It works fine for me when I run from the host cmd line directly. But when jenkins invokes the same, it throws below exception.

(I also tried gradle1.2 but it has the same issue).

$ /app1/gradle-1.4/bin/gradle test --debug

FAILURE: Build aborted because of an internal error.

  • What went wrong: Build aborted because of an unexpected internal error. Please file an issue at: http://forums.gradle.org.

  • Try: Run with --debug option to get additional debug info.

  • Exception is: org.gradle.internal.nativeplatform.NativeIntegrationException: Could not create JNA native library ‘/.gradle/jna/libjnidispatch.so’.

at org.gradle.internal.nativeplatform.jna.JnaBootPathConfigurer.configure(JnaBootPathConfigurer.java:70)

at org.gradle.logging.internal.TerminalDetectorFactory.create(TerminalDetectorFactory.java:37)

at org.gradle.logging.LoggingServiceRegistry.createOutputEventRenderer(LoggingServiceRegistry.java:127)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.gradle.internal.service.DefaultServiceRegistry.invoke(DefaultServiceRegistry.java:175)

at org.gradle.internal.service.DefaultServiceRegistry.access$300(DefaultServiceRegistry.java:47)

at org.gradle.internal.service.DefaultServiceRegistry$FactoryMethodService.create(DefaultServiceRegistry.java:336)

at org.gradle.internal.service.DefaultServiceRegistry$ManagedObjectProvider.getInstance(DefaultServiceRegistry.java:240)

at org.gradle.internal.service.DefaultServiceRegistry$SingletonService.getService(DefaultServiceRegistry.java:275)

at org.gradle.internal.service.DefaultServiceRegistry$OwnServices.getService(DefaultServiceRegistry.java:215)

at org.gradle.internal.service.DefaultServiceRegistry.doGet(DefaultServiceRegistry.java:145)

at org.gradle.internal.service.AbstractServiceRegistry.get(AbstractServiceRegistry.java:65)

at org.gradle.logging.LoggingServiceRegistry.(LoggingServiceRegistry.java:46)

at org.gradle.logging.LoggingServiceRegistry.newCommandLineProcessLogging(LoggingServiceRegistry.java:53)

at org.gradle.launcher.cli.CommandLineActionFactory.createLoggingServices(CommandLineActionFactory.java:73)

at org.gradle.launcher.cli.CommandLineActionFactory.convert(CommandLineActionFactory.java:53)

at org.gradle.launcher.Main.doAction(Main.java:48)

at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)

at org.gradle.launcher.Main.main(Main.java:39)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)

at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)

at org.gradle.launcher.GradleMain.main(GradleMain.java:26) Caused by: java.io.FileNotFoundException: /.gradle/jna/libjnidispatch.so (No such file or directory)

at java.io.FileOutputStream.open(Native Method)

at java.io.FileOutputStream.(FileOutputStream.java:194)

at java.io.FileOutputStream.(FileOutputStream.java:145)

at org.gradle.internal.nativeplatform.jna.JnaBootPathConfigurer.configure(JnaBootPathConfigurer.java:60)

… 28 more