hyperledger / fabric-chaincode-java

Hyperledger Fabric Contract and Chaincode implementation for Java
https://hyperledger.github.io/fabric-chaincode-java/
Apache License 2.0
304 stars 207 forks source link

Error in invokeChaincode when invoke method in the same chaincode #218

Closed Xyronix99 closed 2 years ago

Xyronix99 commented 2 years ago

Environment: fabric release-2.2 My chaincode named vulnerable is as follows:

image

  1. When I invoke helloworld directly, it gives me responce "helloworld", everything works fine.
  2. When I invoke invokeDirectly, it also gives me responce "helloworld".
  3. But when I invoke invokeSameContract method, it gives me

image

and chaincode docker container logging is as follows:

image

Observation of results above: (1) the statement System.out.printf("\n%s\n", chaincodeName) works fine. (2) org.hyperledger.fabric.shim.impl.InvocationStubImpl.invokeChaincode has reached the statement final ByteString response = this.handler.invoke(invokeChaincodeMessage);.

Xyronix99 commented 2 years ago

Sorry for the interruption. It’s a mistake, the function name should be the first arguments.