- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
使用fabric-java-sdk发送链码初始化请求时遇到问题。
部署(安装)方法:
public Collection<ProposalResponse> deploy(Collection<Peer> peers)
throws InvalidArgumentException, ProposalException {
String chaincodeName = chaincode.name();
String chaincodeVersion = chaincode.version();
HyperLedgerClient hyperLedgerClient = hyperLedgerChannelClient.getHyperLedgerClient();
InstallProposalRequest request = hyperLedgerClient.newInstallProposalRequest();
ChaincodeID.Builder chaincodeIDBuilder =
ChaincodeID.newBuilder()
.setName(chaincodeName)
.setVersion(chaincodeVersion);
ChaincodeID chaincodeID = chaincodeIDBuilder.build();
LOGGER.info(
"Deploying chaincode " + chaincodeName + " using Fabric client " +
hyperLedgerClient.getUserContext().getMspId()
+ " " + hyperLedgerClient.getUserContext().getName()
);
request.setChaincodeID(chaincodeID);
request.setUserContext(hyperLedgerClient.getUserContext());
request.setChaincodeInputStream(chaincode.source());
request.setChaincodeVersion(chaincodeVersion);
request.setChaincodeLanguage(Type.JAVA);
return hyperLedgerClient.sendInstallProposal(request, peers);
}
public Collection<ProposalResponse> instantiate(
String functionName, String[] functionArgs)
throws InvalidArgumentException, ProposalException {
HyperLedgerClient hyperLedgerClient = hyperLedgerChannelClient.getHyperLedgerClient();
String channelName = hyperLedgerChannelClient.getName();
String chaincodeName = chaincode.name();
String userContextName = hyperLedgerClient.getUserContext().getName();
String mspId = hyperLedgerClient.getUserContext().getMspId();
LOGGER.info(
"Instantiate proposal request {} on channel {} with Fabric client {} {}",
chaincodeName, channelName, mspId, userContextName
);
InstantiateProposalRequest instantiateProposalRequest =
hyperLedgerClient.getHfClient().newInstantiationProposalRequest();
instantiateProposalRequest.setProposalWaitTime(180000);
ChaincodeID.Builder chaincodeIDBuilder = ChaincodeID.newBuilder()
.setName(chaincodeName)
.setVersion(chaincode.version());
ChaincodeID ccid = chaincodeIDBuilder.build();
LOGGER.info("Instantiating Chaincode ID {} on channel {}", chaincodeName, channelName);
instantiateProposalRequest.setChaincodeID(ccid);
instantiateProposalRequest.setChaincodeLanguage(Type.JAVA);
instantiateProposalRequest.setFcn(functionName);
instantiateProposalRequest.setArgs(functionArgs);
Map<String, byte[]> tm = new HashMap<>();
tm.put("HyperLedgerFabric", "InstantiateProposalRequest:JavaSDK".getBytes(UTF_8));
tm.put("method", "InstantiateProposalRequest".getBytes(UTF_8));
instantiateProposalRequest.setTransientMap(tm);
Collection<ProposalResponse> responses =
hyperLedgerChannelClient.sendInstantiationProposal(instantiateProposalRequest);
CompletableFuture<TransactionEvent> completableFuture =
hyperLedgerChannelClient.sendTransaction(responses);
LOGGER.info(
"Chaincode {} on channel {} instantiation {}",
chaincodeName, channelName, completableFuture
);
return responses;
}
➜ transfer-chaincode git:(master) ✗ gradle clean buildProjectArchive
Configuration on demand is an incubating feature.
BUILD SUCCESSFUL in 1s
2 actionable tasks: 2 executed
➜ transfer-chaincode git:(master) ✗ tar -tvf build/distributions/transfer-chaincode-1.0.0-SNAPSHOT.tgz
-rw-r--r-- 0 0 0 1817 Mar 2 21:31 build.gradle
drwxr-xr-x 0 0 0 0 Feb 25 15:00 src/
drwxr-xr-x 0 0 0 0 Mar 2 21:22 src/main/
drwxr-xr-x 0 0 0 0 Mar 2 18:50 src/main/resources/
drwxr-xr-x 0 0 0 0 Mar 2 18:50 src/main/resources/config/
-rw-r--r-- 0 0 0 0 Mar 2 18:50 src/main/resources/config/application.yml
drwxr-xr-x 0 0 0 0 Feb 25 15:02 src/main/java/
drwxr-xr-x 0 0 0 0 Feb 25 15:02 src/main/java/com/
drwxr-xr-x 0 0 0 0 Feb 25 15:02 src/main/java/com/
drwxr-xr-x 0 0 0 0 Feb 25 15:02 src/main/java/com/fundtransfer/
drwxr-xr-x 0 0 0 0 Mar 2 18:49 src/main/java/com/fundtransfer/transfer/
-rw-r--r-- 0 0 0 1142 Mar 2 18:49 src/main/java/com/fundtransfer/transfer/TransferChaincodeApplication.java
drwxr-xr-x 0 0 0 0 Mar 2 21:12 src/main/java/com/fundtransfer/transfer/service/
-rw-r--r-- 0 0 0 1950 Mar 2 21:12 src/main/java/com/fundtransfer/transfer/service/ChaincodeEntrypoint.java
drwxr-xr-x 0 0 0 0 Mar 2 21:23 src/main/gradle/
-rw-r--r-- 0 0 0 39 Mar 2 21:23 src/main/gradle/settings.gradle
-rw-r--r-- 0 0 0 1587 Mar 2 21:28 gradle.properties
-rw-r--r-- 0 0 0 39 Mar 2 21:23 settings.gradle
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
services:
peer-base:
image: hyperledger/fabric-peer:$HYPERLEDGER_VERSION
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
# the following setting starts chaincode containers on the same
# bridge network as the peers
# https://docs.docker.com/compose/networking/
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_fundtransfer
# - FABRIC_LOGGING_SPEC=INFO
- FABRIC_LOGGING_SPEC=DEBUG
- CORE_PEER_ENDORSER_ENABLED=true
- CORE_PEER_PROFILE_ENABLED=true
- CORE_PEER_CHANNELSERVICE_ENABLED=true
- CORE_PEER_GOSSIP_USELEADERELECTION=true
- CORE_PEER_GOSSIP_ORGLEADER=false
- CORE_PEER_TLS_ENABLED=false
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
working_dir: /opt/hyperledger/peer
command: peer node start
peer0.gateway.fundtransfer.com | 2019-03-02 17:39:27.230 UTC [comm.grpc.server] 1 -> INFO 1ad unary call completed {"grpc.start_time": "2019-03-02T17:39:27.194Z", "grpc.service": "protos.Endorser", "grpc.method": "ProcessProposal", "grpc.peer_address": "172.20.0.1:41564", "grpc.code": "OK", "grpc.call_duration": "35.5921ms"}
peer0.gateway.fundtransfer.com | 2019-03-02 17:39:32.846 UTC [endorser] callChaincode -> INFO 1ae [all-orgs-channel][ada2da1f] Entry chaincode: name:"lscc"
peer0.gateway.fundtransfer.com | 2019-03-02 17:39:58.340 UTC [chaincode.platform.java] GenerateDockerBuild -> ERRO 1af Can't build java chaincode Error returned from build: 1 "Maven build
peer0.gateway.fundtransfer.com | [INFO] Scanning for projects...
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [INFO] BUILD FAILURE
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [INFO] Total time: 1.818 s
peer0.gateway.fundtransfer.com | [INFO] Finished at: 2019-03-02T17:39:57Z
peer0.gateway.fundtransfer.com | [INFO] Final Memory: 6M/46M
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/chaincode/input/src). Please verify you invoked Maven from the correct directory. -> [Help 1]
peer0.gateway.fundtransfer.com | [ERROR]
peer0.gateway.fundtransfer.com | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
peer0.gateway.fundtransfer.com | [ERROR] Re-run Maven using the -X switch to enable full debug logging.
peer0.gateway.fundtransfer.com | [ERROR]
peer0.gateway.fundtransfer.com | [ERROR] For more information about the errors and possible solutions, please read the following articles:
peer0.gateway.fundtransfer.com | [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
peer0.gateway.fundtransfer.com | "
peer0.gateway.fundtransfer.com | 2019-03-02 17:39:58.340 UTC [chaincode.platform] func1 -> ERRO 1b0 Failed to generate platform-specific docker build: Error returned from build: 1 "Maven build
peer0.gateway.fundtransfer.com | [INFO] Scanning for projects...
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [INFO] BUILD FAILURE
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [INFO] Total time: 1.818 s
peer0.gateway.fundtransfer.com | [INFO] Finished at: 2019-03-02T17:39:57Z
peer0.gateway.fundtransfer.com | [INFO] Final Memory: 6M/46M
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/chaincode/input/src). Please verify you invoked Maven from the correct directory. -> [Help 1]
peer0.gateway.fundtransfer.com | [ERROR]
peer0.gateway.fundtransfer.com | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
peer0.gateway.fundtransfer.com | [ERROR] Re-run Maven using the -X switch to enable full debug logging.
peer0.gateway.fundtransfer.com | [ERROR]
peer0.gateway.fundtransfer.com | [ERROR] For more information about the errors and possible solutions, please read the following articles:
peer0.gateway.fundtransfer.com | [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
peer0.gateway.fundtransfer.com | "
peer0.gateway.fundtransfer.com | 2019-03-02 17:39:58.340 UTC [dockercontroller] deployImage -> ERRO 1b1 Error building image: Failed to generate platform-specific docker build: Error returned from build: 1 "Maven build
peer0.gateway.fundtransfer.com | [INFO] Scanning for projects...
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [INFO] BUILD FAILURE
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [INFO] Total time: 1.818 s
peer0.gateway.fundtransfer.com | [INFO] Finished at: 2019-03-02T17:39:57Z
peer0.gateway.fundtransfer.com | [INFO] Final Memory: 6M/46M
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/chaincode/input/src). Please verify you invoked Maven from the correct directory. -> [Help 1]
peer0.gateway.fundtransfer.com | [ERROR]
peer0.gateway.fundtransfer.com | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
peer0.gateway.fundtransfer.com | [ERROR] Re-run Maven using the -X switch to enable full debug logging.
peer0.gateway.fundtransfer.com | [ERROR]
peer0.gateway.fundtransfer.com | [ERROR] For more information about the errors and possible solutions, please read the following articles:
peer0.gateway.fundtransfer.com | [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
peer0.gateway.fundtransfer.com | "
peer0.gateway.fundtransfer.com | 2019-03-02 17:39:58.340 UTC [dockercontroller] deployImage -> ERRO 1b2 Build Output:
peer0.gateway.fundtransfer.com | ********************
peer0.gateway.fundtransfer.com |
peer0.gateway.fundtransfer.com | ********************
peer0.gateway.fundtransfer.com | 2019-03-02 17:39:58.359 UTC [endorser] callChaincode -> INFO 1b3 [all-orgs-channel][ada2da1f] Exit chaincode: name:"lscc" (25548ms)
peer0.gateway.fundtransfer.com | 2019-03-02 17:39:58.359 UTC [endorser] SimulateProposal -> ERRO 1b4 [all-orgs-channel][ada2da1f] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "Maven build
peer0.gateway.fundtransfer.com | [INFO] Scanning for projects...
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [INFO] BUILD FAILURE
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [INFO] Total time: 1.818 s
peer0.gateway.fundtransfer.com | [INFO] Finished at: 2019-03-02T17:39:57Z
peer0.gateway.fundtransfer.com | [INFO] Final Memory: 6M/46M
peer0.gateway.fundtransfer.com | [INFO] ------------------------------------------------------------------------
peer0.gateway.fundtransfer.com | [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/chaincode/input/src). Please verify you invoked Maven from the correct directory. -> [Help 1]
peer0.gateway.fundtransfer.com | [ERROR]
peer0.gateway.fundtransfer.com | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
peer0.gateway.fundtransfer.com | [ERROR] Re-run Maven using the -X switch to enable full debug logging.
peer0.gateway.fundtransfer.com | [ERROR]
peer0.gateway.fundtransfer.com | [ERROR] For more information about the errors and possible solutions, please read the following articles:
peer0.gateway.fundtransfer.com | [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
peer0.gateway.fundtransfer.com | "
peer0.gateway.fundtransfer.com | error starting container
peer0.gateway.fundtransfer.com | error starting container
peer0.gateway.fundtransfer.com | 2019-03-02 17:39:58.359 UTC [comm.grpc.server] 1 -> INFO 1b5 unary call completed {"grpc.start_time": "2019-03-02T17:39:32.845Z", "grpc.service": "protos.Endorser", "grpc.method": "ProcessProposal", "grpc.peer_address": "172.20.0.1:41564", "grpc.code": "OK", "grpc.call_duration": "25.5488994s"}
peer0.gateway.fundtransfer.com | 2019-03-02 17:47:34.631 UTC [endorser] callChaincode -> INFO 1b6 [all-orgs-channel][74212e9f] Entry chaincode: name:"lscc"
peer0.gateway.fundtransfer.com | 2019-03-02 17:47:36.258 UTC [comm.grpc.server] 1 -> INFO 1b7 streaming call completed {"grpc.start_time": "2019-03-02T17:39:18.839Z", "grpc.service": "protos.Deliver", "grpc.method": "Deliver", "grpc.peer_address": "172.20.0.1:41566", "error": "context finished before block retrieved: context canceled", "grpc.code": "Unknown", "grpc.call_duration": "8m18.0064816s"}
gradle
。如何切换同伴使用gradle?
最佳答案
问题在于,我正在发送带有以下结构的tgz
存档:
src/main/...
build.gradle
settings.gradle
src/src/main/...
src/build.gradle
src/settings.gradle
关于gradle - Hyperledger:使用Gradle构建Chaincode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54961314/
我在使用 gradle 构建一个特定应用程序时遇到问题。该应用程序可以用 eclipse 编译和构建,它在平板电脑上运行良好。当我尝试使用 Gradle 构建它时,“compileDebugJava”
我有一个 C 程序,是一位离开的开发人员留给我的。我试图弄清楚他到底在做什么,并将软件重新安排成更合乎逻辑的东西,这样我就可以更轻松地构建它。我正在使用 CMake 构建,而他使用的是 Make。 有
我刚开始阅读“Pro Spring MVC with web flow”,它附带了一个我想遵循的代码示例。 我要什么 - 我想像书中那样构建应用程序,使用 Gradle 有什么问题 - 我没用过 Gr
我希望有人已经这样做了。我正在尝试为我的一个 angular 2 项目在 teamcity 中建立一个连续的构建。在做了一些研究之后,我按照以下步骤操作: 构建步骤 1:为 teamcity 安装 j
我有一个旧的 ASP.Net 网站解决方案,看起来像: 当我在 Visual Studio 中构建解决方案时,我得到以下输出: ------ Build started: Project: C:\..
我使用 gulp-usref、gulp-if、gulp-uglify、gulp-csso 和 gulp-file-include 来构建我的应用程序。除了 HTML 保持原样外,构建中的一切都运行良好
我正在使用 ionic2 开发内部移动应用程序。我可以通过以下方式成功构建 ios: ionic build ios and ionic build ios --prod 但当我这样做时,它一直失败
我是一位经验丰富的 .NET/C# 开发人员,但对这里的几乎所有技术/库(包括 SQL/DB 工作)都是新手。 我正在开发一个具有 Azure/Entity Framework .NET 后端和可移植
我正在使用 VS 2008。我可以使用 IDE 成功编译我的解决方案。但是,当我尝试使用 devenv.com 构建它时,它失败并提示“错误:找不到项目输出组'(无法确定名称)的输出”。该组、其配置或
版本: ember.js 2.7,ember-data 2.7 ember-cli 2.9.1//同样适用于 ember-cli 2.7 node 6.9.1, npm 3.10.9//也适用于 no
我第一次修补 AzureDevops,设置一些 CI 任务。 我有一个公共(public)存储库(开源)和一个包含 3 个 F# 项目的解决方案(.sln)。该解决方案在 Windows/Mac/Li
目前 5.1.5 版本或 STLPort CVS 存储库似乎仍不支持 VS2008。如果有人已经完成了这项工作,那么如果可能的话,分享会很有用:) 同样,了解 VS2005 或 2008 x64 构建
我有一个 Python 2.7 项目,到目前为止一直使用 gfortran 和 MinGW 来构建扩展。我使用 MinGW,因为它似乎支持 Fortran 代码中的写入语句和可分配数组,而 MSVC
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。 9年前关闭。 Improve this que
我想知道为什么在 Zimbra Wiki 中只列出了构建过程的特定平台。这意味着不可能在其他 Linux 发行版上构建 Zimbra? Zimbra 社区选择一个特殊的 Linux 发行版来构建 Zi
我将在 Swift 中构建一个 CLI 工具。我用这个命令创建了项目 swift package init --type executable当我构建我的项目并解析 时读取别名 Xcode 中的参数并
我想为添加到 docker 镜像的文件设置文件权限。我有这个简单的 Dockerfile: FROM ubuntu:utopic WORKDIR /app RUN groupadd -g 1000 b
当我使用 clBuildProgram在我的 OpenCl 代码中,它失败并显示错误代码 -11,没有任何日志信息。 这是我的代码的样子: ret = clBuildProgram(program
我有一个底部导航栏,它有一个列表页面,该页面使用状态块。 class _MainPageState extends State { int _index = 0; @override Wi
我在本地计算机上使用Jenkins(Jenkins URL未通过Internet公开,但该计算机上已启用Internet。) 我进行了以下配置更改: 在Jenkins工具上安装了Git和Github插
我是一名优秀的程序员,十分优秀!