我正在尝试使用RPC连接到我的M12 CordaApp并调用nodeIdentity()
方法,我得到了org.bouncycastle.cert.CertIOException
。我认为Java客户端代码有效,我可以看到RPC连接,当我尝试调用getProtocolVersion()
时,我看到了正确的协议版本。
这是调用nodeIdentity()
时的堆栈跟踪:
10:50:25.848 [Thread-0 (ActiveMQ-client-global-threads-1076641925)] ERROR org.apache.activemq.artemis.core.client - AMQ214000: Failed to call onMessage org.bouncycastle.cert.CertIOException: malformed data: sequence wrong size for a certificate at org.bouncycastle.cert.X509CertificateHolder.parseBytes(Unknown Source) ~[bcpkix-jdk15on-1.56.jar:1.56.0.0] at org.bouncycastle.cert.X509CertificateHolder.(Unknown Source) ~[bcpkix-jdk15on-1.56.jar:1.56.0.0] at net.corda.core.serialization.X509CertificateSerializer.read(Kryo.kt:641) ~[core-0.12.1.jar:?] at net.corda.core.serialization.X509CertificateSerializer.read(Kryo.kt:639) ~[core-0.12.1.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.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.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.readClassAndObject(Kryo.java:813) ~[kryo-4.0.0.jar:?] at net.corda.core.serialization.KryoKt$deserialize$1$1.execute(Kryo.kt:110) ~[core-0.12.1.jar:?] at net.corda.core.serialization.KryoPoolWithContext.run(Kryo.kt:653) ~[core-0.12.1.jar:?] at net.corda.core.serialization.KryoKt.deserialize(Kryo.kt:110) ~[core-0.12.1.jar:?] at net.corda.nodeapi.RPCApi$ServerToClient$Companion.fromClientMessage(RPCApi.kt:177) ~[node-api-0.12.1.jar:?] at net.corda.client.rpc.internal.RPCClientProxyHandler.artemisMessageHandler(RPCClientProxyHandler.kt:224) ~[rpc-0.12.1.jar:?] at net.corda.client.rpc.internal.RPCClientProxyHandler.access$artemisMessageHandler(RPCClientProxyHandler.kt:58) ~[rpc-0.12.1.jar:?] at net.corda.client.rpc.internal.RPCClientProxyHandler$start$3.invoke(RPCClientProxyHandler.kt:174) ~[rpc-0.12.1.jar:?] at net.corda.client.rpc.internal.RPCClientProxyHandler$start$3.invoke(RPCClientProxyHandler.kt:58) ~[rpc-0.12.1.jar:?] at net.corda.client.rpc.internal.RPCClientProxyHandlerKt$sam$MessageHandler$43516406.onMessage(RPCClientProxyHandler.kt) ~[rpc-0.12.1.jar:?] at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1001) ~[artemis-core-client-1.5.3.jar:1.5.3] at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:49) ~[artemis-core-client-1.5.3.jar:1.5.3] at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1124) [artemis-core-client-1.5.3.jar:1.5.3] at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:101) [artemis-commons-1.5.3.jar:1.5.3] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131] Caused by: java.lang.IllegalArgumentException: sequence wrong size for a certificate at org.bouncycastle.asn1.x509.Certificate.(Unknown Source) ~[bcprov-jdk15on-1.56.jar:1.56.0] at org.bouncycastle.asn1.x509.Certificate.getInstance(Unknown Source) ~[bcprov-jdk15on-1.56.jar:1.56.0] ... 42 more
看起来X509证书序列化有问题,我错过了什么吗?
答案 0 :(得分:0)
我们怀疑这可能会在M13中修复,但M14就在附近,因此可能值得等待,直接更新。