Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/COMPANION.toContractId compile errorForum ↗

COMPANION.toContractId compile error

App Development2 posts229 views3 likesLast activity Oct 2022
YA
YazanDianiehOP
Oct 2022

We have generated JAVA code from a DAR built using SDK 2.4
daml build
daml codegen java

However, all contracts have a compile error because toContractId method is not found on ContractCompanion.WithoutKey class.

Compile error below. Can you please advise?
Thanks

java: cannot find symbol
** symbol: method toContractId(com.daml.ledger.javaapi.data.codegen.ContractId< deleted >)**
** location: variable COMPANION of type com.daml.ledger.javaapi.data.codegen.ContractCompanion.WithoutKey<deleted>**

YA
YazanDianieh
Oct 2022

Please ignore.

Code was being built with com.daml:bindings-java:2.3.2

Following an upgrade to com.daml:bindings-java:2.4.0, code now builds with no errors.

← Back to Discussions