简体   繁体   English

Bluemix Blockchain Chaincode演示产生“Undefined”错误

[英]Bluemix Blockchain Chaincode demo producing “Undefined” error

I created a Blockchain service in Bluemix and tested the web-based demo of chaincode (the one with Example02, Marbles, and Commercial Paper). 我在Bluemix中创建了一个区块链服务,并测试了基于网络的链代码演示(带有Example02,Marbles和Commercial Paper的代码)。

I clicked the Deployed button for Example02 and it is successful. 我单击Example02的Deployed按钮,它成功了。 However, when I click the "Query A" button, it gave an "undefined" error. 但是,当我单击“查询A”按钮时,它会出现“未定义”错误。

Do I need to do additional steps before clicking the "Query A" button? 在单击“查询A”按钮之前,是否需要执行其他步骤?

Below is the console output: 以下是控制台输出:

Registering enrollID dashboarduser_type1_e367e87de4
  Success - registering enrollID

Deploying chaincode https://github.com/masterDev1985/hyperledger_chaincode/chaincode_example02
  Success - deployment (wait for the cc to start up)...

  done
Querying function - query ["a"]
  Error - undefined

Querying function - query ["a"]
  Error - query

Indeed you are missing a step. 的确,你错过了一步。 When you deployed the chaincode you only submitted the code that powers the demo app "Marbles". 当您部署链代码时,您只提交了为演示应用程序“Marbles”提供支持的代码。 There is no marble yet. 还没有大理石。 Before you can query the marble you should create one. 在查询大理石之前,您应该创建一个大理石。 Click the "Create Marble" button. 单击“创建大理石”按钮。 Then do the query, and all should be well. 然后做查询,一切都应该好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM