hyperledger / fabric-samples

Samples for Hyperledger Fabric
https://wiki.hyperledger.org/display/fabric
Apache License 2.0
2.81k stars 3.4k forks source link

An exception is thrown when executing channel.sendTransaction() #1172

Closed riiyn closed 3 months ago

riiyn commented 10 months ago

I successfully built the 1.4 version test network using the byfn.sh script, and then used the 1.4.13 version fabric-sdk-java to develop the client. After connecting to the test network, an exception was thrown when executing channel.sendTransaction:

Caused by: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID *** status 10.

The peer used is peer0.org1.example.com. What may be the cause?

bestbeforetoday commented 3 months ago

Fabric's transaction validation code 10 corresponds to an endorsement policy failure. For some reason the client did not obtain sufficient endorsements for the transaction proposal to meet the effective endorsement policy for the transaction. There is more information on endorsement policies in the Fabric documentation.

Please note that Fabric v1.4 is long out of support. fabric-sdk-java is also deprecated. Fabric v2.5 is the current long-term support release, and the client application API for use with that Fabric version is the Fabric Gateway client API, which has implementations in Java, Go and Node (TypeScript / JavaScript). If at all possible, I would strongly recommend moving to these current versions.