We're updating the issue view to help you get more done. 

Custom serialisers not found when running mock network tests

Description

This bug is manifested in the Corda settler repo on the branch rog-c5-rebase. When the XRP settlement unit tests are run, they all fail with the exception below. This is likely because the customer serialiser for AccountID (which is a Ripple lib defined type) cannot be found.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 java.io.NotSerializableException: data(net.corda.core.contracts.ContractState) -> settlementMethod(com.r3.corda.finance.obligation.types.SettlementMethod) -> Trying to build an object serializer for com.r3.corda.finance.ripple.types.XrpSettlement, but it is not constructable from its public properties, and so requires a custom serialiser. at net.corda.serialization.internal.amqp.ObjectSerializer$Companion.make(ObjectSerializer.kt:18) at net.corda.serialization.internal.amqp.DefaultLocalSerializerFactory.makeNonCustomSerializer(LocalSerializerFactory.kt:240) at net.corda.serialization.internal.amqp.DefaultLocalSerializerFactory.access$makeNonCustomSerializer(LocalSerializerFactory.kt:79) at net.corda.serialization.internal.amqp.DefaultLocalSerializerFactory$makeClassSerializer$1.invoke(LocalSerializerFactory.kt:222) at net.corda.serialization.internal.amqp.DefaultLocalSerializerFactory$makeClassSerializer$1.invoke(LocalSerializerFactory.kt:79) at net.corda.serialization.internal.amqp.DefaultLocalSerializerFactory.makeAndCache(LocalSerializerFactory.kt:123) at net.corda.serialization.internal.amqp.DefaultLocalSerializerFactory.makeAndCache(LocalSerializerFactory.kt:119) at net.corda.serialization.internal.amqp.DefaultLocalSerializerFactory.makeClassSerializer(LocalSerializerFactory.kt:213) at net.corda.serialization.internal.amqp.DefaultLocalSerializerFactory.get(LocalSerializerFactory.kt:188) at net.corda.serialization.internal.amqp.ComposedSerializerFactory.get(SerializerFactory.kt) at net.corda.serialization.internal.amqp.SerializationOutput.writeObject$serialization(SerializationOutput.kt:128) at net.corda.serialization.internal.amqp.SerializationOutput.writeObjectOrNull$serialization(SerializationOutput.kt:123) at net.corda.serialization.internal.amqp.DescribedTypeWriteStrategy.writeProperty(ComposableTypePropertySerializer.kt:228) at net.corda.serialization.internal.amqp.ComposableTypePropertySerializer.writeProperty(ComposableTypePropertySerializer.kt) at net.corda.serialization.internal.amqp.ComposableObjectWriter$writeObject$1$1.invoke(ObjectSerializer.kt:115) at net.corda.serialization.internal.amqp.ComposableObjectWriter$writeObject$1$1.invoke(ObjectSerializer.kt:94) at net.corda.serialization.internal.amqp.SerializationHelperKt.withList(SerializationHelper.kt:30) at net.corda.serialization.internal.amqp.ComposableObjectWriter$writeObject$1.invoke(ObjectSerializer.kt:113) at net.corda.serialization.internal.amqp.ComposableObjectWriter$writeObject$1.invoke(ObjectSerializer.kt:94) at net.corda.serialization.internal.amqp.SerializationHelperKt.withDescribed(SerializationHelper.kt:19) at net.corda.serialization.internal.amqp.ComposableObjectWriter.writeObject(ObjectSerializer.kt:112) at net.corda.serialization.internal.amqp.ComposableObjectSerializer.writeObject(ObjectSerializer.kt:88) at net.corda.serialization.internal.amqp.SerializationOutput.writeObject$serialization(SerializationOutput.kt:136) at net.corda.serialization.internal.amqp.SerializationOutput.writeObjectOrNull$serialization(SerializationOutput.kt:123) at net.corda.serialization.internal.amqp.DescribedTypeWriteStrategy.writeProperty(ComposableTypePropertySerializer.kt:228) at net.corda.serialization.internal.amqp.ComposableTypePropertySerializer.writeProperty(ComposableTypePropertySerializer.kt) at net.corda.serialization.internal.amqp.ComposableObjectWriter$writeObject$1$1.invoke(ObjectSerializer.kt:115) at net.corda.serialization.internal.amqp.ComposableObjectWriter$writeObject$1$1.invoke(ObjectSerializer.kt:94) at net.corda.serialization.internal.amqp.SerializationHelperKt.withList(SerializationHelper.kt:30) at net.corda.serialization.internal.amqp.ComposableObjectWriter$writeObject$1.invoke(ObjectSerializer.kt:113) at net.corda.serialization.internal.amqp.ComposableObjectWriter$writeObject$1.invoke(ObjectSerializer.kt:94) at net.corda.serialization.internal.amqp.SerializationHelperKt.withDescribed(SerializationHelper.kt:19) at net.corda.serialization.internal.amqp.ComposableObjectWriter.writeObject(ObjectSerializer.kt:112) at net.corda.serialization.internal.amqp.ComposableObjectSerializer.writeObject(ObjectSerializer.kt:88) at net.corda.serialization.internal.amqp.SerializationOutput.writeObject$serialization(SerializationOutput.kt:136) at net.corda.serialization.internal.amqp.SerializationOutput.writeObject$serialization$default(SerializationOutput.kt:127) at net.corda.serialization.internal.amqp.SerializationOutput.writeObject$serialization(SerializationOutput.kt:108) at net.corda.serialization.internal.amqp.SerializationOutput$_serialize$1$1.invoke(SerializationOutput.kt:83) at net.corda.serialization.internal.amqp.SerializationOutput$_serialize$1$1.invoke(SerializationOutput.kt:32) at net.corda.serialization.internal.amqp.SerializationHelperKt.withList(SerializationHelper.kt:30) at net.corda.serialization.internal.amqp.SerializationOutput$_serialize$1.invoke(SerializationOutput.kt:82) at net.corda.serialization.internal.amqp.SerializationOutput$_serialize$1.invoke(SerializationOutput.kt:32) at net.corda.serialization.internal.amqp.SerializationHelperKt.withDescribed(SerializationHelper.kt:19) at net.corda.serialization.internal.amqp.SerializationOutput._serialize$serialization(SerializationOutput.kt:81) at net.corda.serialization.internal.amqp.SerializationOutput.serialize(SerializationOutput.kt:51) at net.corda.serialization.internal.amqp.AbstractAMQPSerializationScheme.serialize(AMQPSerializationScheme.kt:235) at net.corda.serialization.internal.SerializationFactoryImpl$serialize$1$1.invoke(SerializationScheme.kt:120) at net.corda.serialization.internal.SerializationFactoryImpl$serialize$1$1.invoke(SerializationScheme.kt:73) at net.corda.core.serialization.SerializationFactory.withCurrentContext(SerializationAPI.kt:71) at net.corda.serialization.internal.SerializationFactoryImpl$serialize$1.invoke(SerializationScheme.kt:120) at net.corda.serialization.internal.SerializationFactoryImpl$serialize$1.invoke(SerializationScheme.kt:73) at net.corda.core.serialization.SerializationFactory.asCurrent(SerializationAPI.kt:85) at net.corda.serialization.internal.SerializationFactoryImpl.serialize(SerializationScheme.kt:120) at net.corda.core.serialization.SerializationAPIKt.serialize(SerializationAPI.kt:324) at net.corda.core.serialization.SerializationAPIKt.serialize$default(SerializationAPI.kt:323) at net.corda.core.internal.TransactionUtilsKt$createComponentGroups$serialize$1.invoke(TransactionUtils.kt:141) at net.corda.core.internal.TransactionUtilsKt$createComponentGroups$serialize$1.invoke(TransactionUtils.kt) at net.corda.core.internal.LazyMappedList.get(InternalUtils.kt:552) at java.util.AbstractList$Itr.next(AbstractList.java:358) at net.corda.core.transactions.WireTransaction$availableComponentNonces$2.invoke(WireTransaction.kt:420) at net.corda.core.transactions.WireTransaction$availableComponentNonces$2.invoke(WireTransaction.kt:50) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at net.corda.core.transactions.WireTransaction.getAvailableComponentNonces$core(WireTransaction.kt) at net.corda.core.transactions.WireTransaction$availableComponentHashes$2.invoke(WireTransaction.kt:310) at net.corda.core.transactions.WireTransaction$availableComponentHashes$2.invoke(WireTransaction.kt:50) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at net.corda.core.transactions.WireTransaction.getAvailableComponentHashes$core(WireTransaction.kt) at net.corda.core.transactions.WireTransaction$groupsMerkleRoots$2.invoke(WireTransaction.kt:288) at net.corda.core.transactions.WireTransaction$groupsMerkleRoots$2.invoke(WireTransaction.kt:50) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at net.corda.core.transactions.WireTransaction.getGroupsMerkleRoots$core(WireTransaction.kt) at net.corda.core.transactions.WireTransaction$groupHashes$2.invoke(WireTransaction.kt:273) at net.corda.core.transactions.WireTransaction$groupHashes$2.invoke(WireTransaction.kt:50) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at net.corda.core.transactions.WireTransaction.getGroupHashes$core(WireTransaction.kt) at net.corda.core.transactions.WireTransaction$merkleTree$2.invoke(WireTransaction.kt:261) at net.corda.core.transactions.WireTransaction$merkleTree$2.invoke(WireTransaction.kt:50) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at net.corda.core.transactions.WireTransaction.getMerkleTree(WireTransaction.kt) at net.corda.core.transactions.WireTransaction.getId(WireTransaction.kt:78) at net.corda.core.transactions.TransactionBuilder.toSignedTransaction(TransactionBuilder.kt:686) at net.corda.core.node.ServiceHub$DefaultImpls.signInitialTransaction(ServiceHub.kt:232) at net.corda.core.node.ServiceHub$DefaultImpls.signInitialTransaction(ServiceHub.kt:246) at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.signInitialTransaction(ServiceHubInternal.kt) at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.signInitialTransaction(AbstractNode.kt:962) at net.corda.core.node.ServiceHub$DefaultImpls.signInitialTransaction(ServiceHub.kt:268) at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.signInitialTransaction(ServiceHubInternal.kt) at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.signInitialTransaction(AbstractNode.kt:962) at com.r3.corda.finance.obligation.client.flows.UpdateSettlementMethod.call(UpdateSettlementMethod.kt:68) at com.r3.corda.finance.obligation.client.flows.UpdateSettlementMethod.call(UpdateSettlementMethod.kt:19) at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:239) at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:45) at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100) at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) at java.util.concurrent.FutureTask.run(FutureTask.java) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:63)

Status

Assignee

Tudor Malene

Reporter

Roger Willis

Priority

High

Labels

None

Severity

Medium

Fix versions

Ported to...

None

Feature Team

Corda Core

Affects versions

Corda 4