mercredi 9 novembre 2016

Intellij debugger giving error for groovy tests while running using gradle test runner but works while using java test runner

I am trying to debug some groovy tests using the gradle test runner and get the following error :

Connected to the target VM, address: '127.0.0.1:52063', transport: 'socket'
Disconnected from the target VM, address: '127.0.0.1:52063', transport: 'socket'
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
Could not write standard input into: Gradle Test Executor 2.
java.io.IOException: The pipe is being closed
    at java.io.FileOutputStream.writeBytes(Native Method)
    at java.io.FileOutputStream.write(FileOutputStream.java:326)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:56)
    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)

While running using the "platform test runner" the dubugger works just fine.

I tried a lot of solutions given online but none of them worked. Some solutions that I found and tried which did not work are :

1) Restarting the machine and trying again.

2) Killing the java.exe processes and trying again.

3) checking if firewall was blocking the connection, but firewall is off.

4) pinging localhost, 127.0.0.1 and ::1, all are reachable with 0% packet loss.

Please suggest what could be causing the problem here and how can I solve it.

Aucun commentaire:

Enregistrer un commentaire