Re: Question about invokeChaincode api #fabric-chaincode


Matthew White
 

Hello;
 
Can I suggest that you raise an issue on the github  hyperledger/fabric-chaincode-java repo?
 
Though to check that you can call `helloworld()` directly from `invokeChaincode` without having to call invokeChaincode?  Pass on the ctx variable, and both methods are then part of the same transaction. 
 
Typically only use invokerChaincode, when you going to a completely different chaincode.
 
 
Regards, Matthew.
Matthew B White  IBM Blockchain Solutions Architect
 
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at  calanais.me.uk
 
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday 
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN

"The wrong answers are the ones you go looking for when the right answers stare you in the face"
 
 
 
----- Original message -----
From: "BigBang019" <zhuxy0000@...>
Sent by: fabric@...
To: fabric@...
Cc:
Subject: [EXTERNAL] [Hyperledger Fabric] Question about invokeChaincode api #fabric-chaincode
Date: Fri, Dec 17, 2021 11:24 AM
 
Environment: fabric release-2.2 My chaincode named vulnerable is as follows: When I invoke helloworld directly, it gives me responce "helloworld", everything works fine. But when I invoke invokeChaincode method, it gives me and chaincode ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Environment: fabric release-2.2
My chaincode named vulnerable is as follows:


When I invoke helloworld directly, it gives me responce "helloworld", everything works fine.

But when I invoke invokeChaincode method, it gives me



and chaincode docker container logging is as follows:



It seems like
(1) the statement System.out.printf("\n%s\n", chaincodeName) works fine.
(2) org.hyperledger.fabric.shim.impl.InvocationStubImpl.invokeChaincode also finds the registered method helloworld, but it encountered another exception half way the invocation.

Does anyone met this problem before?
Thanks in advance.
 

Unless stated otherwise above:

IBM United Kingdom Limited - Registered in England and Wales with number 741598.

Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Join fabric@lists.hyperledger.org to automatically receive all group messages.