[Nix-dev] Using gradle in netbeans

moaxcp moaxcp at gmail.com
Tue Jun 14 16:10:25 CEST 2016


I was actually trying to use sdkman to set up my environment. I can see in
the nixpkgs where the .so file gets patched with the correct library paths.

I'm going to use nix to set it up now and try to upgrade to version 2.14.

Could this be a bug in the way native libraries are resolved in gradle?
On Jun 14, 2016 9:13 AM, "Kamil Chmielewski" <kamil.chm at gmail.com> wrote:

> Are you using gradlew wrapper? If so, try to remove /home/john/.gradle/,
> install gralde from nix or use nix-shell -p gradle and use gradle to build
> your project instead of provided ./gradlew.
> I don't use Netbeans but there should be some option to use global gradle
> instead of gradle wrapper.
>
> --
> Kamil
>
>
> 2016-06-14 14:52 GMT+02:00 moaxcp <moaxcp at gmail.com>:
>
>> Hello, I'm new to nixos and I'm having a problem getting gradle to work
>> in netbeans. Somewhere along the way gradle has a .so file that cannot link
>> to libstdc++.so. Is there anything I can do to fix this? Here is the error:
>>
>> Issue 1
>> --------
>>
>>   Requested project: /home/john/NetBeansProjects/awstest
>>
>>   Stack trace:
>>     org.gradle.tooling.GradleConnectionException: Could not create an
>> instance of Tooling API implementation using the specified Gradle
>> distribution '
>> https://services.gradle.org/distributions/gradle-2.14-bin.zip'.
>>     at
>> org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:95)
>>     at
>> org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:43)
>>     at
>> org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:42)
>>     at
>> org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:99)
>>     at
>> org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:82)
>>     at
>> org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
>>     at
>> org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
>>     at
>> org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
>>     at
>> org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
>>     at
>> org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
>>     at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>     at java.lang.Thread.run(Thread.java:745)
>>     at
>> org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
>>     at
>> org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:49)
>>     at
>> org.netbeans.gradle.project.model.GradleModelLoader.loadModelWithProgress(GradleModelLoader.java:558)
>>     at
>> org.netbeans.gradle.project.model.GradleModelLoader.fixProjectLoadKey(GradleModelLoader.java:362)
>>     at
>> org.netbeans.gradle.project.model.GradleModelLoader.access$700(GradleModelLoader.java:71)
>>     at
>> org.netbeans.gradle.project.model.GradleModelLoader$6.run(GradleModelLoader.java:391)
>>     at
>> org.netbeans.gradle.project.tasks.GradleDaemonManager.runNonBlockingGradleTask(GradleDaemonManager.java:35)
>>     at
>> org.netbeans.gradle.project.tasks.GradleDaemonManager.access$100(GradleDaemonManager.java:22)
>>     at
>> org.netbeans.gradle.project.tasks.GradleDaemonManager$2.execute(GradleDaemonManager.java:125)
>>     at
>> org.jtrim.concurrent.AbstractTaskExecutorService$FunctionWrapper.execute(AbstractTaskExecutorService.java:270)
>>     at
>> org.jtrim.concurrent.AbstractTaskExecutorService$TaskOfAbstractExecutor.execute(AbstractTaskExecutorService.java:340)
>>     at
>> org.jtrim.concurrent.Tasks$RunOnceCancelableTask.execute(Tasks.java:342)
>>     at
>> org.jtrim.concurrent.SingleThreadedExecutor$QueuedItem.runTask(SingleThreadedExecutor.java:919)
>>     at
>> org.jtrim.concurrent.SingleThreadedExecutor$QueuedItem.access$1200(SingleThreadedExecutor.java:898)
>>     at
>> org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.executeTask(SingleThreadedExecutor.java:815)
>>     at
>> org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.processQueue(SingleThreadedExecutor.java:827)
>>     at
>> org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.run(SingleThreadedExecutor.java:861)
>>     at
>> org.jtrim.concurrent.SingleThreadedExecutor$Impl$1.run(SingleThreadedExecutor.java:453)
>>     at java.lang.Thread.run(Thread.java:745)
>>     Caused by: net.rubygrapefruit.platform.NativeException: Failed to
>> load native library 'libnative-platform.so' for Linux amd64.
>>     at
>> net.rubygrapefruit.platform.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:49)
>>     at net.rubygrapefruit.platform.Native.init(Native.java:55)
>>     at
>> org.gradle.internal.nativeintegration.services.NativeServices.initialize(NativeServices.java:74)
>>     at
>> org.gradle.internal.nativeintegration.services.NativeServices.initialize(NativeServices.java:60)
>>     at
>> org.gradle.tooling.internal.provider.DefaultConnection.initializeServices(DefaultConnection.java:82)
>>     at
>> org.gradle.tooling.internal.provider.DefaultConnection.configure(DefaultConnection.java:75)
>>     at
>> org.gradle.tooling.internal.consumer.connection.AbstractPost12ConsumerConnection.configure(AbstractPost12ConsumerConnection.java:37)
>>     at
>> org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:87)
>>     at
>> org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:43)
>>     at
>> org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:42)
>>     at
>> org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:99)
>>     at
>> org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:82)
>>     at
>> org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
>>     at
>> org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
>>     at
>> org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
>>     at
>> org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
>>     at
>> org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
>>     at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>     ... 1 more
>>     Caused by: java.lang.UnsatisfiedLinkError:
>> /home/john/.gradle/native/19/linux-amd64/libnative-platform.so:
>> libstdc++.so.6: cannot open shared object file: No such file or directory
>>     at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>>     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
>>     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
>>     at java.lang.Runtime.load0(Runtime.java:809)
>>     at java.lang.System.load(System.java:1086)
>>     at
>> net.rubygrapefruit.platform.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:45)
>>     ... 19 more
>>
>>
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160614/50df1a63/attachment-0001.html>


More information about the nix-dev mailing list