1
votes

Scenario:

  1. I am running the irs-demo application on Linux instance
  2. NodeExplorer is installed on Windows instance
  3. I try to connect to BankA node of irs-demo, to view the nodes vault and transactions with the help of NodeExplorer, using following command:

    java -jar corda-tools-explorer-3.2-corda.jar

  4. Following are the credentials of PartyA that I have used to login to NodeExplorer

      Corda Node: <IP_address_of_Linux_instance>
      Port: <RPC_port_number>
      Username: <RPC_user>
      Password: <RPC_password>
    

Observations:

  1. When no transactions are performed by PartyA, I can successfully login to the NodeExplorer and connect to PartyA, using about credentials
  2. When I make few transactions for PartyA using Web Browser, and then try to login to the NodeExplorer using same credentials, following exception is thrown:

    [INFO ] 05:02:07,923 [JavaFX Application Thread] (InternalUtils.kt:208) internal.RPCClient.logElapsedTime - Startup took 1084 msec {}  
    00:02  WARN: [kryo] Unable to load class net.corda.irs.contract.InterestRateSwap$State with kryo's ClassLoader. Retrying with current..
    [ERROR] 05:02:09,791 [Thread-0 (ActiveMQ-client-global-threads)] (ClientConsumerImpl.java:1122) core.client.run - AMQ214000: Failed to call onMessage {}
    com.esotericsoftware.kryo.KryoException: Unable to find class: net.corda.irs.contract.InterestRateSwap$State
    Serialization trace:
    data (net.corda.core.contracts.TransactionState)
    state (net.corda.core.contracts.StateAndRef)
    states (net.corda.core.node.services.Vault$Page)
    snapshot (net.corda.core.messaging.DataFeed)
    value (net.corda.core.utilities.Try$Success)
    at     com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:160) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:160) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:133) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.Kryo.readClass(Kryo.java:693) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:118) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.Kryo.readObjectOrNull(Kryo.java:782) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:132) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:813) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:134) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:40) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:731) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:731) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:731) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.read(CompatibleFieldSerializer.java:147) ~[kryo-4.0.0.jar:?]
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:813) ~[kryo-4.0.0.jar:?]
    at net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme$deserialize$$inlined$use$lambda$1$1.invoke(KryoSerializationScheme.kt:97) ~[corda-node-api-3.2-corda.jar:?]
    at net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme$deserialize$$inlined$use$lambda$1$1.invoke(KryoSerializationScheme.kt:37) ~[corda-node-api-3.2-corda.jar:?]
    at net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme.withContext(KryoSerializationScheme.kt:80) ~[corda-node-api-3.2-corda.jar:?]
    at net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme.access$withContext(KryoSerializationScheme.kt:37) ~[corda-node-api-3.2-corda.jar:?]
    at net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme$deserialize$$inlined$use$lambda$1.execute(KryoSerializationScheme.kt:95) ~[corda-node-api-3.2-corda.jar:?]
    at com.esotericsoftware.kryo.pool.KryoPoolQueueImpl.run(KryoPoolQueueImpl.java:61) ~[kryo-4.0.0.jar:?]
    at net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme.deserialize(KryoSerializationScheme.kt:94) ~[corda-node-api-3.2-corda.jar:?]
    at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1$1.invoke(SerializationScheme.kt:111) ~[corda-node-api-3.2-corda.jar:?]
    at net.corda.core.serialization.SerializationFactory.withCurrentContext(SerializationAPI.kt:66) ~[corda-core-3.2-corda.jar:?]
    at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:111) ~[corda-node-api-3.2-corda.jar:?]
    at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:86) ~[corda-node-api-3.2-corda.jar:?]
    at net.corda.core.serialization.SerializationFactory.asCurrent(SerializationAPI.kt:80) ~[corda-core-3.2-corda.jar:?]
    at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl.deserialize(SerializationScheme.kt:111) ~[corda-node-api-3.2-corda.jar:?]
    at net.corda.nodeapi.RPCApi$ServerToClient$Companion.fromClientMessage(RPCApi.kt:360) ~[corda-node-api-3.2-corda.jar:?]
    at net.corda.client.rpc.internal.RPCClientProxyHandler.artemisMessageHandler(RPCClientProxyHandler.kt:256) ~[corda-rpc-3.2-corda.jar:?]
    at net.corda.client.rpc.internal.RPCClientProxyHandler.access$artemisMessageHandler(RPCClientProxyHandler.kt:69) ~[corda-rpc-3.2-corda.jar:?]
    at net.corda.client.rpc.internal.RPCClientProxyHandler$start$2.invoke(RPCClientProxyHandler.kt:197) ~[corda-rpc-3.2-corda.jar:?]
    at net.corda.client.rpc.internal.RPCClientProxyHandler$start$2.invoke(RPCClientProxyHandler.kt:69) ~[corda-rpc-3.2-corda.jar:?]
    at net.corda.client.rpc.internal.RPCClientProxyHandlerKt$sam$MessageHandler$6fb61eb3.onMessage(RPCClientProxyHandler.kt) ~[corda-rpc-3.2-corda.jar:?]
    at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:997) ~[artemis-core-client-2.2.0.jar:2.2.0]
    at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:49) ~[artemis-core-client-2.2.0.jar:2.2.0]
    at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1120) [artemis-core-client-2.2.0.jar:2.2.0]
    at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) [artemis-commons-2.2.0.jar:2.2.0]
    at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) [artemis-commons-2.2.0.jar:2.2.0]
    at org.apache.activemq.artemis.utils.actors.ProcessorBase$ExecutorTask.run(ProcessorBase.java:53) [artemis-commons-2.2.0.jar:2.2.0]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
    Caused by: java.lang.ClassNotFoundException: net.corda.irs.contract.InterestRateSwap$State
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_181]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_181]
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_181]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_181]
    at java.lang.Class.forName0(Native Method) ~[?:1.8.0_181]
    at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_181]
    at     com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:154) ~[kryo-4.0.0.jar:?]
    ... 48 more
    

Note:
I got the same exception, if I run the irs-demo application and NodeExplorer on single windows instance

2

2 Answers

1
votes

The key exception is:

Caused by: java.lang.ClassNotFoundException: net.corda.irs.contract.InterestRateSwap$State

This indicates that the Node Explorer does not have the IRS CorDapp installed, and cannot therefore deserialise InterestRateSwap$State objects.

This appears to be a bug. I've raised it here: https://r3-cev.atlassian.net/browse/CORDA-1992.

0
votes

This is the temporary way that you need put the miss class file into Node Explore by manual, after that you will find the transaction flow into explorer.