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

Incompatibility with grpc-java 1.33.0 #441

Closed
djaneluz opened this issue Oct 28, 2020 · 5 comments
Closed

Incompatibility with grpc-java 1.33.0 #441

djaneluz opened this issue Oct 28, 2020 · 5 comments
Assignees
Labels
feedback required Information are missing or feedback for suggestions is requested incompatibility Incompatibilities between components or versions

Comments

@djaneluz
Copy link

My application uses grpc.version = 1.33.0 and the server works just fine. But when I add this client lib and try to use it, I get the error:

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    net.devh.boot.grpc.client.channelfactory.ShadedNettyChannelFactory.newChannelBuilder(ShadedNettyChannelFactory.java:73)

The following method did not exist:

    'io.grpc.internal.AbstractManagedChannelImplBuilder io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.defaultLoadBalancingPolicy(java.lang.String)'

The method's class, io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder, is available from the following locations:

    jar:file:/C:/Users/d_luz/.m2/repository/io/grpc/grpc-netty-shaded/1.33.0/grpc-netty-shaded-1.33.0.jar!/io/grpc/netty/shaded/io/grpc/netty/NettyChannelBuilder.class

The class hierarchy was loaded from the following locations:

    io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder: file:/C:/Users/d_luz/.m2/repository/io/grpc/grpc-netty-shaded/1.33.0/grpc-netty-shaded-1.33.0.jar
    io.grpc.ForwardingChannelBuilder: file:/C:/Users/d_luz/.m2/repository/io/grpc/grpc-api/1.33.0/grpc-api-1.33.0.jar
    io.grpc.ManagedChannelBuilder: file:/C:/Users/d_luz/.m2/repository/io/grpc/grpc-api/1.33.0/grpc-api-1.33.0.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder


Process finished with exit code 1

I'm using the last version

    <dependency>
        <groupId>net.devh</groupId>
        <artifactId>grpc-client-spring-boot-starter</artifactId>
        <version>2.10.1.RELEASE</version>
    </dependency>

Which I noticed use an older version of io.grpc. I'm not sure if this is causing the problem.

Any ideas on how to fix this?

@ST-DDT
Copy link
Collaborator

ST-DDT commented Oct 29, 2020

This looks like an incompatibility due to the grpc-java update.
Your options:

  1. Downgrade grpc-java
  2. Wait for the next release of this library
  3. Temporarily overwrite/recompile the offending class (ShadedNettyChannelFactory) by copying it to your code.

@ST-DDT ST-DDT self-assigned this Oct 29, 2020
@ST-DDT ST-DDT added the incompatibility Incompatibilities between components or versions label Oct 29, 2020
@ST-DDT ST-DDT added this to the 2.11.0 milestone Oct 29, 2020
@ST-DDT
Copy link
Collaborator

ST-DDT commented Oct 29, 2020

See also:
grpc/grpc-java#7552
and
grpc/grpc-java#7564

@ST-DDT ST-DDT added the on hold Currently no progress possible label Oct 29, 2020
@ST-DDT
Copy link
Collaborator

ST-DDT commented Oct 29, 2020

Waiting for grpc-java v1.33.1 release

@ST-DDT ST-DDT changed the title Problem with grpc-netty-shaded Incompatibility with grpc-java 1.33.0 Oct 30, 2020
@ST-DDT ST-DDT removed this from the 2.11.0 milestone Oct 30, 2020
@ST-DDT
Copy link
Collaborator

ST-DDT commented Oct 30, 2020

Fixed upstream - Update to grpc-java v1.33.1
Could you please verify whether this fixes the errors for you?

@ST-DDT ST-DDT added feedback required Information are missing or feedback for suggestions is requested and removed on hold Currently no progress possible labels Oct 30, 2020
@djaneluz
Copy link
Author

djaneluz commented Nov 2, 2020 via email

@djaneluz djaneluz closed this as completed Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback required Information are missing or feedback for suggestions is requested incompatibility Incompatibilities between components or versions
Projects
None yet
Development

No branches or pull requests

2 participants