Task view hangs after updating to Buildship 1.0.16

Continuing the discussion from Buildship 1.0.16 is now available:

It looks like a problem with Gradle itself. Can you please try and kill all Gradle daemon processes and then restart Eclipse?

Who to identify the Gradle daemon processes on my Windows 7?

I do my development on a mac so I’m not hundred precent sure. If I remember correctly the default process explorer doesn’t give you the details on processes. From the command line you can perhaps use wmic. Also, there is a handy tool called Sysinternals Process Explorer which might help you.

gradle --stop will kill the daemon

looking at the gradle documentation tells me a gradle daemon is running, if it is enabled via “org.gradle.daemon=true” in gradle.properties
I do not have this configuration file. Thus, I do not believe that a gradle daemon is running

BTW, I have downgraded Buildship plugin to 1.0.15 already and I had restarted my complete machine.
I still see the error which I had reported on both gradle processes in eclipse (populate gradle task view and import gradle project)

thx, but I have no gradle installation on my machine. just gradle Buildship plugin in my eclipse

The Gradle Tooling API module (what Buildship utilises to communicate with Gradle) always uses the daemon.

I have no command line ‘gradle’. Thus, I am not able to use gradle --stop

Until now, I was also not able to identify the gradle daemon as a running process on my Windows 7.
Do you have some more information about the gradle daemon process which would help me to identify it?
Thx in advance.

I have found a couple of daemon log files

the last entries are:
14:39:41.986 [DEBUG] [org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler] Finishing executing command: Build{id=94ea290a-c297-42eb-bd3d-4de5abc013ca.1, currentDir=C:\AppDev\eclipse-Mars-JavaEE}
14:39:41.986 [DEBUG] [org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler] Received finished message: org.gradle.launcher.daemon.protocol.Finished@71312b63
14:39:41.986 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 31: stopping connection
14:39:41.986 [DEBUG] [org.gradle.launcher.daemon.server.DefaultDaemonConnection] thread 32: Could not receive message from client.
org.gradle.internal.remote.internal.MessageIOException: Could not read message from ‘/’.
at org.gradle.internal.remote.internal.inet.SocketConnection.receive(SocketConnection.java:85)
at org.gradle.launcher.daemon.server.SynchronizedDispatchConnection.receive(SynchronizedDispatchConnection.java:68)
at org.gradle.launcher.daemon.server.DefaultDaemonConnection$1.run(DefaultDaemonConnection.java:63)
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:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)
Caused by: com.esotericsoftware.kryo.KryoException: java.io.IOException: An established connection was aborted by the software in your host machine.
at com.esotericsoftware.kryo.io.Input.fill(Input.java:141)
at com.esotericsoftware.kryo.io.Input.require(Input.java:159)
at com.esotericsoftware.kryo.io.Input.readInt(Input.java:308)
at org.gradle.internal.serialize.kryo.KryoBackedDecoder.readSmallInt(KryoBackedDecoder.java:120)
at org.gradle.internal.serialize.DefaultSerializerRegistry$TaggedTypeSerializer.read(DefaultSerializerRegistry.java:105)
at org.gradle.internal.serialize.Serializers$StatefulSerializerAdapter$1.read(Serializers.java:36)
at org.gradle.internal.remote.internal.inet.SocketConnection.receive(SocketConnection.java:78)
… 7 more
Caused by: java.io.IOException: An established connection was aborted by the software in your host machine.
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:55)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:235)
at sun.nio.ch.IOUtil.read(IOUtil.java:204)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:394)
at org.gradle.internal.remote.internal.inet.SocketConnection$SocketInputStream.read(SocketConnection.java:176)
at com.esotericsoftware.kryo.io.Input.fill(Input.java:139)
… 13 more
14:39:41.988 [DEBUG] [org.gradle.launcher.daemon.server.SynchronizedDispatchConnection] thread 31: stopping connection
14:39:41.993 [ERROR] [system.err]
14:39:41.994 [ERROR] [system.err] FAILURE: Build failed with an exception.
14:39:41.994 [ERROR] [system.err]
14:39:41.994 [ERROR] [system.err] * What went wrong:
14:39:41.994 [ERROR] [system.err] object is not an instance of declaring class
14:39:41.994 [ERROR] [system.err]
14:39:41.994 [ERROR] [system.err] * Try:
14:39:41.995 [ERROR] [system.err] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
14:39:41.996 [DEBUG] [org.gradle.launcher.daemon.registry.PersistentDaemonRegistry] Removing daemon address: [229b825e-c6eb-4f2d-90d0-d002112aa194 port:60822, addresses:[/, /0:0:0:0:0:0:0:1]]
Daemon vm is shutting down… The daemon has exited normally or was terminated in response to a user interrupt.
14:39:41.997 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on daemon addresses registry.
14:39:41.997 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired.
14:39:41.999 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.

Does somebody have an idea, what went wrong?

Could it be that you have a firewall set up which blocks your local network connections?

a company tool - may be it got new rules/policies

Most probably that’s the root cause of your problems.

The Firewall does not seem to be the problem.
I switched it completely off and I still observe the reported gradle errors

In task manager (aka task damager) go to the processes tab and kill all “java.exe” processes

Thx, Lance_Java
Thus, gradle daemon are Java processes
–> none is running before I start my eclipse

@Donát: I just notice the following:
in .gradle/daemon/ are found folders “2.13” and "2.14"
The “2.14” had been created today, after I had updated Buildship

Looks like that a switch to gradle 2.14 had happened by the update

EDIT, because I hit the “reply limit as a new user”:
I switched back to gradle 2.13 for my eclipse projects.
Now, import gradle project and population of gradle task view worked again.

But, when I start a gradle task for my eclipse project, again gradle 2.14 is used and I getting the same error

Can you please help me to keep using gradle 2.13.
Thx in advance.

EDIT (hit limit of replies for new user):
@Donat, reply to your post on gradle version and Buildship version:
That is what I did:
Import and gradle task view population worked again and used gradle 2.13 for my eclipse project.
But then I started a task from the gradle task view and again gradle 2.14 was used and I got the errors

Importing as with 2.13 works, but gradle tasks are executed with 2.14 which is not working on my machine

The downgrade to Buildship version 1.0.15 did not update eclipse’s artifacts.xml correctly:
it still contains:
artifact classifier=‘osgi.bundle’ id=‘org.gradle.toolingapi’ version=‘2.14.0.v20160614100625’

The Tooling API automatically downloads the used Gradle distributions to the .gradle folder. If you don’t specify anything the used Gradle version will be equal with the TAPI version bundled with Buildship:

  • Buildship 1.0.15 -> Gradle 2.13
  • Buildship 1.0.16 -> Gradle 2.14

If you want to continue to use Gradle 2.13 with the latest Buildship version, just delete your projects from the workspace and re-import it with the Gradle import wizard. On the second page of the wizard you can specify a specific Gradle version.

I need to use a new eclipse in order to assure that Gradle 2.13 is used by Buildship 1.0.15
It looks like as if the uninstall of Buildship did not remove everything from the eclipse environment

Can you confirm that using Buildship 1.0.15 (with Gradle 2.13) works for you but 1.0.16 (with Gradle 2.14) does not?

sorry for the late response.

I can confirm that Buildship 1.0.15 (with Gradle 2.13) is working, but I need to check again, if Buildship 1.0.16 (with Gradle 2.14) is still not working. Give me some more time.