Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeneratedMessageV3.isStringEmpty NoSuchMethodError issue #186

Closed
armmarov opened this issue Jan 15, 2022 · 3 comments
Closed

GeneratedMessageV3.isStringEmpty NoSuchMethodError issue #186

armmarov opened this issue Jan 15, 2022 · 3 comments
Labels

Comments

@armmarov
Copy link

Hi,

I am using the fabric-gateway-java sdk for my api server connected to hyperledger. When it tries to call below function, seems like some error appear from fabric-sdk-java-2.2.11. Not sure if having compatibility issue with protobuf GeneratedMessageV3. Could you please help me on this ? Should I reduce the version to 2.2.10 ?

#############################################

Network network = gateway.getNetwork("main-channel");

############################################

ERROR LOG

java.lang.NoSuchMethodError: 'boolean com.google.protobuf.GeneratedMessageV3.isStringEmpty(java.lang.Object)'
at org.hyperledger.fabric.protos.msp.Identities$SerializedIdentity.getSerializedSize(Identities.java:237) ~[fabric-sdk-java-2.2.11.jar!/:na]
at com.google.protobuf.AbstractMessageLite.toByteString(AbstractMessageLite.java:58) ~[protobuf-java-3.13.0.jar!/:na]
at org.hyperledger.fabric.sdk.transaction.TransactionContext.(TransactionContext.java:70) ~[fabric-sdk-java-2.2.11.jar!/:na]
at org.hyperledger.fabric.sdk.Channel.newTransactionContext(Channel.java:2823) ~[fabric-sdk-java-2.2.11.jar!/:na]
at org.hyperledger.fabric.sdk.Channel.newTransactionContext(Channel.java:2819) ~[fabric-sdk-java-2.2.11.jar!/:na]
at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:907) ~[fabric-sdk-java-2.2.11.jar!/:na]
at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1964) ~[fabric-sdk-java-2.2.11.jar!/:na]
at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1801) ~[fabric-sdk-java-2.2.11.jar!/:na]
at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1222) ~[fabric-sdk-java-2.2.11.jar!/:na]
at org.hyperledger.fabric.gateway.impl.NetworkImpl.initializeChannel(NetworkImpl.java:59) ~[fabric-gateway-java-2.2.3.jar!/:na]
at org.hyperledger.fabric.gateway.impl.NetworkImpl.(NetworkImpl.java:50) ~[fabric-gateway-java-2.2.3.jar!/:na]
at org.hyperledger.fabric.gateway.impl.GatewayImpl.getNetwork(GatewayImpl.java:252) ~[fabric-gateway-java-2.2.3.jar!/:na]
at com.intelliwaremy.hyperledger.services.CoreServiceImpl.evaluateTransaction(CoreServiceImpl.java:255) ~[classes!/:0.0.16]
at com.intelliwaremy.hyperledger.controllers.CoreController.evaluateTransaction(CoreController.java:79) ~[classes!/:0.0.16]
.......

@armmarov
Copy link
Author

armmarov commented Jan 15, 2022

Update

When i override the dependency to 2.2.10, it seems working fine. Maybe have some compatibility issue that you want to check ? Thank you.

<dependency>
    <groupId>org.hyperledger.fabric-sdk-java</groupId>
    <artifactId>fabric-sdk-java</artifactId>
    <version>2.2.10</version>
</dependency>

@bestbeforetoday
Copy link
Member

The v2.2.11 release did update the versions of gRPC and protobuf packages in its dependencies. They are very sensitive to version changes so fabric-sdk-java uses the same protobuf package version as the grpc-protobuf package it uses. If you have any explicit protobuf (or gRPC) dependencies in your application, that might override the versions in the fabric-sdk-java dependencies and cause a conflict.

Right now the fabric-sdk-java and fabric-gateway-java nightly builds are continuing to run successfully so this doesn't appear to be a general problem with those packages.

@bestbeforetoday
Copy link
Member

I can't reproduce this issue locally. Were you able to get things working OK? If so, it would be useful to know the cause and solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants