Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/How does one initialize chaincode for a DAML Runtime on Fabric?Forum ↗

How does one initialize chaincode for a DAML Runtime on Fabric?

App Development2 posts1,018 views2 likesLast activity Jun 2020
AN
anthonyOP
Jun 2020 1

See the issue at the link below, the error I’m encountering is:

Admin@org1.example.com sign cert: /root/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
[error] (run-main-0) com.daml.FabricContextException: response {
[error]   status: 500
[error]   message: "error in simulation: failed to execute transaction f9b97b21b963917a2807414c9832fe2f388f98ac0df946246c7b95754cebe942: invalid invocation: chaincode \'daml_on_fabric\' has not been initialized for this version, must call as init first"
[error] }
[error] com.daml.FabricContextException: response {
[error]   status: 500
[error]   message: "error in simulation: failed to execute transaction f9b97b21b963917a2807414c9832fe2f388f98ac0df946246c7b95754cebe942: invalid invocation: chaincode \'daml_on_fabric\' has not been initialized for this version, must call as init first"
[error] }

I’ve tried adding --isInit to the sbt command as noted here for the peer command but it doesn’t help.

github.com/digital-asset/daml-on-fabric

Versions: Java: 1.8.0 Scala: 2.12.7 (and 2.12.11) SBT: 1.2.8 Steps to reproduce: Run through Katacoda scenario as here Once you get to the step where you run...

BE
bernhard
Jun 2020 1

I’ve added the solution to the linked GitHub issue. It is down to a version mismatch in docker-compose. Please make sure you are using 1.24.0 as per the daml-on-fabric readme. However, this particular issue is easy to solve for older versions so I’ve submitted a PR to the daml-on-fabric repo.

← Back to Discussions