Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When gradle positions junit-dep on the classpath before junit:4.12, SerializableTestName breaks during serialization.
I'll file a separate ticket for the brittleness of these Serializable subclasses of JUnit Rules.
Stack trace of corresponding failure:
java.lang.Error: java.lang.NoSuchFieldException: name at com.gemstone.gemfire.test.junit.rules.serializable.FieldSerializationUtils.readField(FieldSerializationUtils.java:35) at com.gemstone.gemfire.test.junit.rules.serializable.SerializableTestName$SerializationProxy.<init>(SerializableTestName.java:56) at com.gemstone.gemfire.test.junit.rules.serializable.SerializableTestName.writeReplace(SerializableTestName.java:45) at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:1118) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1136) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:294) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:153) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179) at com.sun.proxy.$Proxy24.executeMethodOnObject(Unknown Source) at dunit.hydra.HydraDUnitEnv$RemoteDUnitVMWrapper.executeMethodOnObject(HydraDUnitEnv.java:144) at com.gemstone.gemfire.test.dunit.VM.invoke(VM.java:417) at com.gemstone.gemfire.test.dunit.VM.invoke(VM.java:382) at com.gemstone.gemfire.test.dunit.VM.invoke(VM.java:347) at com.gemstone.gemfire.cache.query.dunit.PdxQueryDUnitTest.testClientForFieldInOtherVersion(PdxQueryDUnitTest.java:3180) at hydra.JUnitTestSuite$1.run(JUnitTestSuite.java:30) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoSuchFieldException: name at java.lang.Class.getDeclaredField(Class.java:2070) at com.gemstone.gemfire.test.junit.rules.serializable.FieldSerializationUtils.readField(FieldSerializationUtils.java:31)