hyperledger / fabric-samples

Samples for Hyperledger Fabric
https://wiki.hyperledger.org/display/fabric
Apache License 2.0
2.78k stars 3.37k forks source link

Test Network SBE (Java) check is failing #1190

Closed denyeart closed 5 months ago

denyeart commented 6 months ago

Test Network SBE (Java) check is failing when calling the SBE Java chaincode https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-sbe/chaincode-java.

The failures started sometime between March 4th and March 19th.

The other Java chaincodes are still working correctly.

The error in the Java chaincode container is:

Thread[main,5,main] 15:57:53:567 INFO    org.hyperledger.fabric.contract.ContractRouter main                              Starting chaincode as client
Thread[grpc-default-executor-0,5,main] 15:57:54:042 SEVERE  org.hyperledger.fabric.shim.ChaincodeBase$1 onError                              An error occured on the chaincode stream. Shutting down the chaincode stream.CANCELLED: Failed to read message.
io.grpc.StatusRuntimeException: CANCELLED: Failed to read message.
    at io.grpc.Status.asRuntimeException(Status.java:537)
    at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481)
    at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:489)
    at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:453)
    at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:486)
    at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:574)
    at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:72)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:742)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723)
    at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
    at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassCastException: class org.hyperledger.fabric.protos.peer.ChaincodeShim$ChaincodeMessage cannot be cast to class org.hyperledger.fabric.protos.peer.ChaincodeMessage (org.hyperledger.fabric.protos.peer.ChaincodeShim$ChaincodeMessage and org.hyperledger.fabric.protos.peer.ChaincodeMessage are in unnamed module of loader 'app')
    at org.hyperledger.fabric.shim.ChaincodeBase$1.onNext(ChaincodeBase.java:207)
    at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:468)
    at io.grpc.internal.DelayedClientCall$DelayedListener.onMessage(DelayedClientCall.java:473)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInternal(ClientCallImpl.java:667)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:654)
    ... 5 more
.. caused by ..
class org.hyperledger.fabric.protos.peer.ChaincodeShim$ChaincodeMessage cannot be cast to class org.hyperledger.fabric.protos.peer.ChaincodeMessage (org.hyperledger.fabric.protos.peer.ChaincodeShim$ChaincodeMessage and org.hyperledger.fabric.protos.peer.ChaincodeMessage are in unnamed module of loader 'app')
java.lang.ClassCastException: class org.hyperledger.fabric.protos.peer.ChaincodeShim$ChaincodeMessage cannot be cast to class org.hyperledger.fabric.protos.peer.ChaincodeMessage (org.hyperledger.fabric.protos.peer.ChaincodeShim$ChaincodeMessage and org.hyperledger.fabric.protos.peer.ChaincodeMessage are in unnamed module of loader 'app')
    at org.hyperledger.fabric.shim.ChaincodeBase$1.onNext(ChaincodeBase.java:207)
    at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:468)
    at io.grpc.internal.DelayedClientCall$DelayedListener.onMessage(DelayedClientCall.java:473)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInternal(ClientCallImpl.java:667)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:654)
    at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
    at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
satota2 commented 5 months ago

This issue has been resolved by #1192, so I will close it.