Gradle build / test failed - kryo.KryoException: Buffer overflow

余生颓废 提交于 2019-12-24 10:38:44

问题


While running a Gradle build, tests are failing.

PS:

1. Gradle is using the correct JDK (1.6) to build.
2. I tried this with JDK 1.7, same error comes there as well.
3. I don't see this error when I build it locally (with JDK 1.6) on a linux/windows
4. machine but one of the machine is giving me this error.

My ?s
1. What can be done to fix the com.esotericsoftware.kryo.KryoException: Buffer overflow error.
2. Why Gradle process failed, even when test section in build.gradle says:

   test {

        ignoreFailures=true
        //more code here for test section...
        //..
   }

Any hints/help appreciated. Error snapshot is shown below:

:test
Unexpected exception thrown.
org.gradle.messaging.remote.internal.MessageIOException: Could not read message from '/0:0:0:0:0:0:0:1:53371'.
        at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:88)
        at org.gradle.messaging.remote.internal.hub.MessageHub$ConnectionReceive.run(MessageHub.java:230)
        at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: com.esotericsoftware.kryo.KryoException: Buffer underflow.
        at com.esotericsoftware.kryo.io.Input.require(Input.java:162)
        at com.esotericsoftware.kryo.io.Input.readByte(Input.java:255)
        at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:64)
        at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:53)
        at org.gradle.messaging.remote.internal.inet.SocketConnection.receive(SocketConnection.java:83)
        ... 5 more
> Building > :test > 84 tests completed
:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> Process 'Gradle Worker 6' finished with non-zero exit value 139

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

回答1:


It's an internal error. Best chance is to try with the latest Gradle version.



来源:https://stackoverflow.com/questions/26721837/gradle-build-test-failed-kryo-kryoexception-buffer-overflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!