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

Error during channel creation

Monika2412 opened this issue · 1 comments

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 got the following

log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Sep 27, 2018 2:27:46 PM org.app.util.Util deleteDirectory
INFO: Deleting - users
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/home/administrator/eclipse-workspace/Peoplechain/network/blockchain-client.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
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)

Z-LL commented

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 got the following

log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Sep 27, 2018 2:27:46 PM org.app.util.Util deleteDirectory
INFO: Deleting - users
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/home/administrator/eclipse-workspace/Peoplechain/network/blockchain-client.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
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)

How did you solve this? I have the same problem.