Unexpected exception thrown while running junit tests


(Przemyslaw Pastuszka) #1

While running junit tests with gradle 1.7:

Unexpected exception thrown. org.gradle.messaging.remote.internal.MessageIOException: Could not read message from ‘/127.0.0.1:48378’.

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:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662) Caused by: java.io.StreamCorruptedException: unexpected block data

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)

at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)

at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)

at org.gradle.messaging.remote.internal.Message$ExceptionPlaceholder.read(Message.java:101)

at org.gradle.messaging.remote.internal.Message$ExceptionPlaceholder.getCause(Message.java:129)

at org.gradle.messaging.remote.internal.Message$ExceptionPlaceholder.read(Message.java:88)

at org.gradle.messaging.remote.internal.Message$ExceptionReplacingObjectInputStream.resolveObject(Message.java:166)

at java.io.ObjectInputStream.checkResolve(ObjectInputStream.java:1376)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)

at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)

at org.gradle.messaging.remote.internal.Message.receive(Message.java:38)

at org.gradle.messaging.serialize.kryo.JavaSerializer$JavaReader.read(JavaSerializer.java:50)

at org.gradle.messaging.remote.internal.hub.MethodInvocationSerializer$MethodInvocationReader.readArguments(MethodInvocationSerializer.java:112)

at org.gradle.messaging.remote.internal.hub.MethodInvocationSerializer$MethodInvocationReader.read(MethodInvocationSerializer.java:107)

at org.gradle.messaging.remote.internal.hub.MethodInvocationSerializer$MethodInvocationReader.read(MethodInvocationSerializer.java:87)

at org.gradle.messaging.serialize.kryo.TypeSafeSerializer$1.read(TypeSafeSerializer.java:37)

at org.gradle.messaging.remote.internal.hub.InterHubMessageSerializer$MessageReader.read(InterHubMessageSerializer.java:67)

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


(jaystgelais) #2

I’m getting this same error with Gradle 1.6, escept I’m seeing the following root exception:

Caused by: com.esotericsoftware.kryo.KryoException: java.io.IOException: An existing connection was forcibly closed by

the remote host

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.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 Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host

at sun.nio.ch.SocketDispatcher.read0(Native Method)

at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)

at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:237)

at sun.nio.ch.IOUtil.read(IOUtil.java:204)

at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)

at org.gradle.messaging.remote.internal.inet.SocketConnection$SocketInputStream.read(SocketConnection.java:167)

at com.esotericsoftware.kryo.io.Input.fill(Input.java:139)

… 10 more