1
请求提供的Java链码:无法部署其由IBM Bluemix从RESTClient实现
POST http://localhost:7050/chaincode
请求:
{ “jsonrpc”: “2.0”, “方法”:“部署“ ”PARAMS“:{ ”类型“:1, ”chaincodeID“:{ ”名称“: ”拉加“ }, ”ctorMsg“:{ ”ARGS“:[ ”初始化“,” 一“,”100“,”b“,”200“] }} , “ID”:5 }
注册Java链代码chaincode ID名称:
[email protected]:~/mychaincode/src/github.com/hyperledger/fabric/examples/chaincode/java/chaincode_example02/build/distributions/chaincode_example02/bin$ CORE_CHAINCODE_ID_NAME=raja ./chaincode_example02
Jun 13, 2017 1:24:06 PM org.hyperledger.fabric.shim.ChaincodeBase newPeerClientConnection
INFO: Configuring channel connection to peer.
Jun 13, 2017 1:24:09 PM org.hyperledger.fabric.shim.ChaincodeBase chatWithPeer
INFO: Connecting to peer.
Jun 13, 2017 1:24:09 PM io.grpc.internal.TransportSet$1 call
INFO: Created transport [email protected](/127.0.0.1:7051) for /127.0.0.1:7051
Jun 13, 2017 1:24:10 PM io.grpc.internal.TransportSet$TransportListener transportReady
INFO: Transport [email protected](/127.0.0.1:7051) for /127.0.0.1:7051 is ready
Jun 13, 2017 1:24:10 PM org.hyperledger.fabric.shim.ChaincodeBase chatWithPeer
INFO: Registering as 'raja' ... sending REGISTER
java.lang.RuntimeException: [raja]Chaincode handler org.hyperledger.fabric.shim.fsm cannot handle message (INIT) with payload size (23) while in state: established
at org.hyperledger.fabric.shim.impl.Handler.handleMessage(Handler.java:493)
at org.hyperledger.fabric.shim.ChaincodeBase$1.onNext(ChaincodeBase.java:188)
at org.hyperledger.fabric.shim.ChaincodeBase$1.onNext(ChaincodeBase.java:181)
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:305)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$2.runInContext(ClientCallImpl.java:423)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:54)
at io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:154)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
请提供更多关于你想要做的事情的信息。你从某个地方得到链码,或者你写了吗? –
也许看看这个:https://github.com/hyperledger-archives/fabric/issues/905 – gonephishing