createrawsendfrom not running through Java Client...

+1 vote

Surprisingly, following command not running through Java Client, but running fine from CLI:

multichain-cli OPMApp createrawsendfrom 1LhxDQ8mQsJTVPUpCYnbeJTWgpSMq24qLQqxGi '{"1Msas1M6Mxx4W4bX2mkTrDp9y7WZmnCmzDCjdV":{"INR":50}}'

When I run it from java client, it raises following error:

Error parsing JSON:'{"1Msas1M6Mxx4W4bX2mkTrDp9y7WZmnCmzDCjdV":{"INR":50}}'

Following is the Java Client code snippet, I have implemented to run it:

StringBuffer cmdStr = new StringBuffer("multichain-cli ");

cmdStr.append(CHAIN).append(" ").append(command.toString().toLowerCase()).append(" ").append("1LhxDQ8mQsJTVPUpCYnbeJTWgpSMq24qLQqxGi ").append("'{").append('"').append("1Msas1M6Mxx4W4bX2mkTrDp9y7WZmnCmzDCjdV").append('"').append(":{").append('"').append("INR").append('"').append(":50").append("}}'");

pr = rt.exec(cmdStr.toString());

Any idea?

asked May 8, 2017 by GST

1 Answer

0 votes

Please add some debugging code to the Java client to output the JSON-RPC request sent, and compare that to the JSON-RPC request displayed in the first line of the output from multichain-cli. That should be enough to spot the difference.

answered May 8, 2017 by MultiChain