Skip to content

Commit

Permalink
Change how chaintool executes
Browse files Browse the repository at this point in the history
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 <jharriso@us.ibm.com>
  • Loading branch information
John Harrison committed Nov 19, 2016
1 parent 1f9ff4d commit 4a6b894
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/chaincode/platforms/car/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ func (carPlatform *Platform) WritePackage(spec *pb.ChaincodeSpec, tw *tar.Writer
//let the executable's name be chaincode ID's name
buf = append(buf, cutil.GetDockerfileFromConfig("chaincode.car.Dockerfile"))
buf = append(buf, "COPY package.car /tmp/package.car")
buf = append(buf, fmt.Sprintf("RUN chaintool buildcar /tmp/package.car -o $GOPATH/bin/%s && rm /tmp/package.car", spec.ChaincodeID.Name))
// invoking directly for maximum JRE compatiblity
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))

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

0 comments on commit 4a6b894

Please sign in to comment.