IBM / blockchain-application-using-fabric-java-sdk

Create and Deploy a Blockchain Network using Hyperledger Fabric SDK Java
https://developer.ibm.com/code/patterns
Apache License 2.0
289 stars 156 forks source link

CreateChannel Error when I re-generate the artifacts #31

Closed haohaohaoer closed 5 years ago

haohaohaoer commented 5 years ago

Hi.... I am facing the following issue while creating the channel. Please help me in this. Thank you..

I created my own project with the help of this project Steps I followed while running:

Go to network folder and issue the following command cryptogen generate --config=./crypto-config.yaml configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./config/genesis.block configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./config/channel.tx -channelID lennahc configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./config/Org1MSPanchors.tx channelID $CHANNEL_NAME -asOrg Org1MSP configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./config/Org2MSPanchors.tx channelID $CHANNEL_NAME -asOrg Org2MSP Updated docker-compose.yml ./build.sh cd ../java mvn install cd target cp blockchain-java-sdk-0.0.1-SNAPSHOT-jar-with-dependencies.jar blockchain-client.jar cp blockchain-client.jar ../../network_resources cd ../../network_resources java -cp blockchain-client.jar org.app.network.CreateChannel

When I run this command I met this error: org.hyperledger.fabric.sdk.exception.TransactionException: New channel mychannel error. StatusValue 400. Status BAD_REQUEST at org.hyperledger.fabric.sdk.Channel.(Channel.java:224) at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1121) at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:135) at org.app.network.CreateChannel.main(CreateChannel.java:60)

maheshwarishikha commented 5 years ago

@haohaohaoer , as per this error message: "New channel mychannel error." seems like you have not chnaged the channel name in Java code. Please check.

maheshwarishikha commented 5 years ago

@haohaohaoer , I do not see any update on this issue after my update. Hope it must have worked for you. Closing this issue now. Feel free to re-open the issue, if the same problem persists.