I’m attempting to write a little java app to submit commands to the json api, and I’m having a little issue with contract keys. When the key has multiple parts (e.g. (Party, Text)) it returns that the key cannot be found, although contracts where the key is just Party do work fine.
I’m creating the key in a HashMap and converting the command to json using Jackson. It seems to match the example on the docs page, so I’m not certain what’s going wrong. Below is an example of the command I’m trying to submit:
Hi @lashenhurst, I don’t see anything off with the query. If you query for Main:SecondContract contracts, do you see a contract with the given key? Maybe it’s just archived or not visible to your party?
Could it be that it’s not the contract that you are exercising the choice on that is not found but that the choice references some other contracts by keys (by calling fetchByKey, lookupByKey or exerciseByKey) and those are not active? It’s a bit hard to see from your example but maybe thirdID and fourthID are used as keys that you lookup later?
If possible, it would be great if you could share some of your DAML code and the full error you are receiving.