嗨,我正在使用Cordite NMS,我设置了节点并部署了DApp,并设置了一个单独的Spring Boot应用程序,该应用程序通过RCP调用一个节点,
我试图做类似创建IOU的事务,为此,我在Webapp端创建了CordaRPCOps,并成功为甲方创建了它,
然后我想通过以下方式参加乙方:
Party otherParty = rpcOps.wellKnownPartyFromX500Name(CordaX500Name);
在这里,我得到的是ClassCastException:
实际上,我想将Cordite NMS设置为NMS和根CA,我按照Cordite提供的说明设置了所有节点和NMS:
https://gitlab.com/cordite/network-map-service/blob/master/FAQ.md#using-java
E 02:13:52 63 client.run - AMQ214000: Failed to call onMessage
com.esotericsoftware.kryo.KryoException: java.lang.ClassCastException: org.bouncycastle.asn1.DLSequence cannot be cast to org.bouncycastle.asn1.ASN1Integer
Serialization trace:
owningKey (net.corda.core.identity.Party)
value (net.corda.core.utilities.Try$Success)
at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:144) ~[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.3-corda.jar:?]
at net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme$deserialize$$inlined$use$lambda$1$1.invoke(KryoSerializationScheme.kt:37) ~[corda-node-api-3.3-corda.jar:?]
at net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme.withContext(KryoSerializationScheme.kt:80) ~[corda-node-api-3.3-corda.jar:?]
at net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme.access$withContext(KryoSerializationScheme.kt:37) ~[corda-node-api-3.3-corda.jar:?]
at net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme$deserialize$$inlined$use$lambda$1.execute(KryoSerializationScheme.kt:95) ~[corda-node-api-3.3-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.3-corda.jar:?]
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1$1.invoke(SerializationScheme.kt:111) ~[corda-node-api-3.3-corda.jar:?]
at net.corda.core.serialization.SerializationFactory.withCurrentContext(SerializationAPI.kt:66) ~[corda-core-3.3-corda.jar:?]
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:111) ~[corda-node-api-3.3-corda.jar:?]
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl$deserialize$1.invoke(SerializationScheme.kt:86) ~[corda-node-api-3.3-corda.jar:?]
at net.corda.core.serialization.SerializationFactory.asCurrent(SerializationAPI.kt:80) ~[corda-core-3.3-corda.jar:?]
at net.corda.nodeapi.internal.serialization.SerializationFactoryImpl.deserialize(SerializationScheme.kt:111) ~[corda-node-api-3.3-corda.jar:?]
at net.corda.nodeapi.RPCApi$ServerToClient$Companion.fromClientMessage(RPCApi.kt:360) ~[corda-node-api-3.3-corda.jar:?]
at net.corda.client.rpc.internal.RPCClientProxyHandler.artemisMessageHandler(RPCClientProxyHandler.kt:268) ~[corda-rpc-3.3-corda.jar:?]
at net.corda.client.rpc.internal.RPCClientProxyHandler.access$artemisMessageHandler(RPCClientProxyHandler.kt:71) ~[corda-rpc-3.3-corda.jar:?]
at net.corda.client.rpc.internal.RPCClientProxyHandler$start$3.invoke(RPCClientProxyHandler.kt:206) ~[corda-rpc-3.3-corda.jar:?]
at net.corda.client.rpc.internal.RPCClientProxyHandler$start$3.invoke(RPCClientProxyHandler.kt:71) ~[corda-rpc-3.3-corda.jar:?]
at net.corda.client.rpc.internal.RPCClientProxyHandlerKt$sam$MessageHandler$26468063.onMessage(RPCClientProxyHandler.kt) ~[corda-rpc-3.3-corda.jar:?]
at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1011) ~[artemis-core-client-2.6.3.jar:2.6.3]
at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:50) ~[artemis-core-client-2.6.3.jar:2.6.3]
at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1134) ~[artemis-core-client-2.6.3.jar:2.6.3]
at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) ~[artemis-commons-2.6.3.jar:2.6.3]
at org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) ~[artemis-commons-2.6.3.jar:2.6.3]
at org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:66) ~[artemis-commons-2.6.3.jar:2.6.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_172]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_172]
at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.6.3.jar:2.6.3]
Caused by: java.lang.ClassCastException: org.bouncycastle.asn1.DLSequence cannot be cast to org.bouncycastle.asn1.ASN1Integer
at org.bouncycastle.asn1.pkcs.PrivateKeyInfo.<init>(Unknown Source) ~[bcprov-jdk15on-1.57.jar:1.57.0]
at org.bouncycastle.asn1.pkcs.PrivateKeyInfo.getInstance(Unknown Source) ~[bcprov-jdk15on-1.57.jar:1.57.0]
at net.corda.core.crypto.Crypto.decodePrivateKey(Crypto.kt:301) ~[corda-core-3.3-corda.jar:?]
at net.corda.nodeapi.internal.serialization.kryo.PrivateKeySerializer.read(Kryo.kt:322) ~[corda-node-api-3.3-corda.jar:?]
at net.corda.nodeapi.internal.serialization.kryo.PrivateKeySerializer.read(Kryo.kt:314) ~[corda-node-api-3.3-corda.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:?]
... 33 more