Hyperledger install Java chaincode #fabric-chaincode

Antoni Massó Mola <antonimassomola@...>


I'm trying to install Java chaincode. I'm able to install go & javascript chaincode but Java installation:

peer chaincode install -n chaincode_exampleJava1 -v 1.2 -l java -p /opt/gopath/src/github.com/chaincode_exampleJava1/

Fails with the following error (tried with v1.4 & v2):

Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "+ INPUT_DIR=/chaincode/input
+ OUTPUT_DIR=/chaincode/output
++ find /chaincode/input -name .jar
++ paste -s -d : -
++ find /chaincode/input -name '*.jar'
++ wc -l
+ for DIR in ${INPUT_DIR} ${INPUT_DIR}/src
+ '[' -f /chaincode/input/build.gradle -o -f /chaincode/input/build.gradle.kts ']'
+ '[' -f /chaincode/input/pom.xml ']'
+ for DIR in ${INPUT_DIR} ${INPUT_DIR}/src
+ '[' -f /chaincode/input/src/build.gradle -o -f /chaincode/input/src/build.gradle.kts ']'
+ buildGradle /chaincode/input/src /chaincode/output
+ cd /chaincode/input/src
Gradle build
+ echo 'Gradle build'
+ '[' -f ./gradlew ']'
+ gradle build shadowJar

Welcome to Gradle 5.6.2!

Here are the highlights of this release:
 - Incremental Groovy compilation
 - Groovy compile avoidance
 - Test fixtures for Java projects
 - Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6.2/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Receiver class com.github.jengelman.gradle.plugins.shadow.internal.DependencyFileCollection does not define or inherit an implementation of the resolved method 'abstract org.gradle.api.tasks.TaskDependency getBuildDependencies()' of interface org.gradle.api.Buildable.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Any help would be appreciated. Thanks.

Join fabric@lists.hyperledger.org to automatically receive all group messages.