Skip to content

Commit 4a6b894

Browse files
author
John Harrison
committed
Change how chaintool executes
The chaintool utiliy is made executable by pre-pending some bash statements within the chaintool binary itself. One of the parameters used to make this happen is -Xbootclasspath/a. Currently, the IBM JVM on the s390x platform cannot process the -Xbootclasspath/a parameter, and as a result, the following error message is diplayed: "Could not find or load main class chaintool.core". To allow all platforms to work with the package.go file, my patch invokes the chaintool using the command: "java -jar /usr/local/bin/chaintool" Change-Id: I164b460cc2d2dbcaca7a102a8aa31de8fdc2751d Signed-off-by: John Harrison <[email protected]>
1 parent 1f9ff4d commit 4a6b894

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/chaincode/platforms/car/package.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ func (carPlatform *Platform) WritePackage(spec *pb.ChaincodeSpec, tw *tar.Writer
7474
//let the executable's name be chaincode ID's name
7575
buf = append(buf, cutil.GetDockerfileFromConfig("chaincode.car.Dockerfile"))
7676
buf = append(buf, "COPY package.car /tmp/package.car")
77-
buf = append(buf, fmt.Sprintf("RUN chaintool buildcar /tmp/package.car -o $GOPATH/bin/%s && rm /tmp/package.car", spec.ChaincodeID.Name))
77+
// invoking directly for maximum JRE compatiblity
78+
buf = append(buf, fmt.Sprintf("RUN java -jar /usr/local/bin/chaintool buildcar /tmp/package.car -o $GOPATH/bin/%s && rm /tmp/package.car", spec.ChaincodeID.Name))
7879

7980
dockerFileContents := strings.Join(buf, "\n")
8081
dockerFileSize := int64(len([]byte(dockerFileContents)))

0 commit comments

Comments
 (0)