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

Projects fail to load with Gradle 2.3-rc-1 #178

Closed
swpalmer opened this Issue Feb 2, 2015 · 15 comments

Comments

Projects
None yet
7 participants
@swpalmer

swpalmer commented Feb 2, 2015

Seems to have trouble finding the tooling APIs.

@kelemen kelemen added the bug label Feb 2, 2015

@kelemen

This comment has been minimized.

Owner

kelemen commented Feb 2, 2015

Thanks for the report. I can reproduce the issue myself. Though, I have no idea the source of the problem yet.

@wvreeven

This comment has been minimized.

wvreeven commented Feb 16, 2015

Here is the stacktrace shown in Netbeans when using gradle 2.3:

Issue 1

Requested project:

Stack trace:
org.gradle.tooling.GradleConnectionException: Could not run build action using Gradle installation ''.
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:55)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
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.DefaultBuildActionExecuter.run(DefaultBuildActionExecuter.java:46)
at org.netbeans.gradle.model.GenericModelFetcher.getModels(GenericModelFetcher.java:166)
at org.netbeans.gradle.project.model.NbGradle18ModelLoader$ProjectModelFetcher.getModels(NbGradle18ModelLoader.java:375)
at org.netbeans.gradle.project.model.NbGradle18ModelLoader.loadModels(NbGradle18ModelLoader.java:80)
at org.netbeans.gradle.project.model.GradleModelLoader.loadModelWithProgress(GradleModelLoader.java:503)
at org.netbeans.gradle.project.model.GradleModelLoader.access$600(GradleModelLoader.java:63)
at org.netbeans.gradle.project.model.GradleModelLoader$6.run(GradleModelLoader.java:372)
at org.netbeans.gradle.project.tasks.GradleDaemonManager.runNonBlockingGradleTask(GradleDaemonManager.java:36)
at org.netbeans.gradle.project.tasks.GradleDaemonManager.access$100(GradleDaemonManager.java:23)
at org.netbeans.gradle.project.tasks.GradleDaemonManager$2.execute(GradleDaemonManager.java:126)
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:905)
at org.jtrim.concurrent.SingleThreadedExecutor$QueuedItem.access$1200(SingleThreadedExecutor.java:884)
at org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.executeTask(SingleThreadedExecutor.java:798)
at org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.processQueue(SingleThreadedExecutor.java:813)
at org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.run(SingleThreadedExecutor.java:847)
at org.jtrim.concurrent.SingleThreadedExecutor$Impl$1.run(SingleThreadedExecutor.java:453)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.gradle.api.GradleException: Could not determine the class-path for class org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.
at org.gradle.tooling.internal.provider.ClasspathInferer.find(ClasspathInferer.java:128)
at org.gradle.tooling.internal.provider.ClasspathInferer.getClassPathFor(ClasspathInferer.java:52)
at org.gradle.tooling.internal.provider.ClientSidePayloadClassLoaderRegistry$1.visitClass(ClientSidePayloadClassLoaderRegistry.java:48)
at org.gradle.tooling.internal.provider.PayloadSerializer$1.writeClassLoader(PayloadSerializer.java:77)
at org.gradle.tooling.internal.provider.PayloadSerializer$1.writeClass(PayloadSerializer.java:68)
at org.gradle.tooling.internal.provider.PayloadSerializer$1.writeClassDescriptor(PayloadSerializer.java:56)
at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1282)
at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1231)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1427)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at org.gradle.tooling.internal.provider.PayloadSerializer.serialize(PayloadSerializer.java:82)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:98)
at org.gradle.tooling.internal.provider.DefaultConnection.run(DefaultConnection.java:171)
at org.gradle.tooling.internal.consumer.connection.CancellableConsumerConnection.run(CancellableConsumerConnection.java:52)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter$1.run(DefaultBuildActionExecuter.java:57)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:88)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConsumerActionExecutor.run(LoggingInitializerConsumerActionExecutor.java:44)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
... 1 more
Caused by: org.gradle.api.GradleException: Cannot determine classpath for org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter from codebase 'jar:file:/.netbeans/8.0.2/modules/ext/gradle-tooling-api-2.1.jar!/'.
at org.gradle.internal.classloader.ClasspathUtil.getClasspathForClass(ClasspathUtil.java:68)
at org.gradle.tooling.internal.provider.ClasspathInferer.find(ClasspathInferer.java:83)
... 23 more

@kelemen

This comment has been minimized.

Owner

kelemen commented Feb 16, 2015

Looking more at this issue, I believe that this is a bug in Gradle and reported it on the Gradle forums.

@eskatos

This comment has been minimized.

Contributor

eskatos commented Feb 18, 2015

👍
Voted in gradle forums and JIRA (https://issues.gradle.org/browse/GRADLE-3245)

@WillBDaniels

This comment has been minimized.

WillBDaniels commented Feb 18, 2015

Voted! thanks for looking into this and getting the issue raised.

@kelemen kelemen added the wontfix label Feb 19, 2015

@kelemen

This comment has been minimized.

Owner

kelemen commented Feb 19, 2015

The issue seems to be fixed in Gradle 2.4-20150218230021+0000. Sadly, this means that Gradle 2.3 will never work with NetBeans (since the bug is in Gradle).

@kelemen

This comment has been minimized.

Owner

kelemen commented Feb 26, 2015

Just for the reference, if someone really wants to use Gradle 2.3 with NetBeans: Setting "Build script evaluation strategy" to "Idea plugin based" will work but in this case lots of custom settings in the build script will not be recognised.

@kelemen

This comment has been minimized.

Owner

kelemen commented Mar 1, 2015

Adjusted the plugin to automatically revert to using the old strategy when trying to use Gradle 2.3 (with an appropriate warning).

@hexture2

This comment has been minimized.

hexture2 commented Aug 12, 2015

From netbeans 8.0.1 I did
help -> check for updates
and was able to move up to 8.0.2
and was at least able to load my existing gradle 2.3 project. with some warnings.
thanks,

{note we had to move back to gradle 2.3 since 2.4 didn't work with Team City build :) }

@ray-print

This comment has been minimized.

ray-print commented Feb 21, 2016

@kelemen THANK YOU for that tip. Was having problems with Gradle 2.11 and Netbeans 7.3.1 and that fixed it.

@kelemen

This comment has been minimized.

Owner

kelemen commented Feb 21, 2016

@ray-print What was your problem exactly? I can load projects using Gradle 2.11 without any problem.

@ray-print

This comment has been minimized.

ray-print commented Feb 22, 2016

If I remember, first I got the "Cannot determine classpath" error, then the "could not run build action" error. The former was solved by setting some configuration option correctly, the latter by setting "Build script evaluation strategy" to "Idea plugin based" as you suggested. I had a set of problems with Gradle, most of which were probably caused because I don't really understand it yet, and because my computer is old (so I'm stuck at Java 1.6 and old versions of Gradle/Netbeans/Eclipse).

@kelemen

This comment has been minimized.

Owner

kelemen commented Feb 22, 2016

If you can reproduce the problem, can you open a separate issue with the stack trace of the error included?

@ray-print

This comment has been minimized.

ray-print commented Feb 23, 2016

Can't easily reproduce it.
If it comes up again I will open up a new issue.

On 2/22/16, Attila Kelemen notifications@github.com wrote:

If you can reproduce the problem, can you open a separate issue with the
stack trace of the error included?


Reply to this email directly or view it on GitHub:
#178 (comment)

@ray-print

This comment has been minimized.

ray-print commented Feb 24, 2016

What do you know, it is reproducible now. Filed as: #265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment