Open sgroh opened 2 years ago
for me it worked after changing the name of the function called (InitLedger). Check if you are using lower/upper camel case consistently w.r.t. the method names in the contract
Check if you can invoke the contract from command line, ie.
peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" -c '{"function":"InitLedger","Args":[]}'
from https://hyperledger-fabric.readthedocs.io/en/release-2.5/test_network.html
If the peer command also throws errors, then you debug from there.
Following the basic instruction from https://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html And using the java chaincode: ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-java/ -ccl java
The asset-transfer-basic/application-gateway-java application fails endorsing the transaction with this error:
Thoughts?