Uploaded image for project: 'Corda'
  1. CORDA-2848

Serialisation bug (or not) when trying to run SWIFT Corda Settler tests

    Details

    • Type: Bug
    • Status: Done (View workflow)
    • Priority: High
    • Resolution: Done
    • Affects versions: Corda 4, Corda 5, Corda Enterprise 4 RC06
    • Fix versions: Corda 4.1
    • Components: None
    • Labels:
      None

      Description

      MakeSwiftPayment is a flow and it looks like this class MakeSWIFTPayment<T : TokenType>. TokenType is defined in another JAR. Perhaps that is a problem here? Worked fine in Corda 3.3.

      java.io.NotSerializableException: data(net.corda.core.contracts.ContractState) -> settlementMethod(com.r3.corda.finance.obligation.types.SettlementMethod) -> com.r3.corda.finance.swift.types.SwiftSettlement -> com.r3.corda.finance.obligation.types.OffLedgerPayment<com.r3.corda.finance.swift.flows.MakeSWIFTPayment<*>> -> com.r3.corda.finance.swift.flows.MakeSWIFTPayment<*> -> Attempted to fingerprint non-composable type com.r3.corda.finance.swift.flows.MakeSWIFTPayment<*>
      
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintNewType(TypeModellingFingerPrinter.kt:142)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintType(TypeModellingFingerPrinter.kt:117)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintTypeParameters(TypeModellingFingerPrinter.kt:196)
      	at net.corda.serialization.internal.model.FingerPrintingState.access$fingerprintTypeParameters(TypeModellingFingerPrinter.kt:90)
      	at net.corda.serialization.internal.model.FingerPrintingState$fingerprintInterface$1.invoke(TypeModellingFingerPrinter.kt:168)
      	at net.corda.serialization.internal.model.FingerPrintingState$fingerprintInterface$1.invoke(TypeModellingFingerPrinter.kt:90)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintWithCustomSerializerOrElse(TypeModellingFingerPrinter.kt:222)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintInterface(TypeModellingFingerPrinter.kt:164)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintNewType(TypeModellingFingerPrinter.kt:138)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintType(TypeModellingFingerPrinter.kt:117)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintInterfaces(TypeModellingFingerPrinter.kt:211)
      	at net.corda.serialization.internal.model.FingerPrintingState.access$fingerprintInterfaces(TypeModellingFingerPrinter.kt:90)
      	at net.corda.serialization.internal.model.FingerPrintingState$fingerprintComposable$1.invoke(TypeModellingFingerPrinter.kt:183)
      	at net.corda.serialization.internal.model.FingerPrintingState$fingerprintComposable$1.invoke(TypeModellingFingerPrinter.kt:90)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintWithCustomSerializerOrElse(TypeModellingFingerPrinter.kt:222)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintComposable(TypeModellingFingerPrinter.kt:180)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintNewType(TypeModellingFingerPrinter.kt:141)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprintType(TypeModellingFingerPrinter.kt:117)
      	at net.corda.serialization.internal.model.FingerPrintingState.fingerprint(TypeModellingFingerPrinter.kt:106)
      	at net.corda.serialization.internal.model.TypeModellingFingerPrinter$fingerprint$1.apply(TypeModellingFingerPrinter.kt:40)
      	at net.corda.serialization.internal.model.TypeModellingFingerPrinter$fingerprint$1.apply(TypeModellingFingerPrinter.kt:30)
      	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1688)
      	at net.corda.serialization.internal.model.TypeModellingFingerPrinter.fingerprint(TypeModellingFingerPrinter.kt:37)
      	at net.corda.serialization.internal.amqp.DefaultLocalSerializerFactory.createDescriptor(LocalSerializerFactory.kt:100)
      	at net.corda.serialization.internal.amqp.ObjectSerializer$Companion.make(ObjectSerializer.kt:22)
      	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(FutureTask.java:266)
      	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)
      
      

        Attachments

          Activity

            People

            • Assignee:
              Dominic.Fox Dominic.Fox@r3.com
              Reporter:
              Roger.Willis Roger Willis
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: