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

Using GRPC via SSL leads to NoClassDefFoundError #102

Open
fedinskiy opened this issue Apr 20, 2021 · 5 comments
Open

Using GRPC via SSL leads to NoClassDefFoundError #102

fedinskiy opened this issue Apr 20, 2021 · 5 comments
Labels

Comments

@fedinskiy
Copy link

Version

3.9.7

Context

After updating vertx-grpc 3.9.6 to 3.9.7 an attempt to use grpc client to communicate with the server via ssl leads to this exception: java.lang.ClassNotFoundException: io.netty.internal.tcnative.SSLSessionCache (full stacktrace can be seen here: https://gist.github.com/fedinskiy/04fd1658ab58516b5a2be24b8a378872)

Do you have a reproducer?

Steps to reproduce

Run test:
mvn clean verify -Dvertx.version=3.9.7

Result: test fails.

Expected result:
Test succeeds, same as running:
mvn clean verify -Dvertx.version=3.9.6

@fedinskiy fedinskiy added the bug label Apr 20, 2021
@akoniar
Copy link

akoniar commented Apr 21, 2021

@fedinskiy It's not bug. Remove the io.netty:netty-tcnative-boringssl-static dependecy from dependecy managment. After that the scenario from reproducer will work

@fedinskiy
Copy link
Author

@akoniar
Copy link

akoniar commented Apr 21, 2021

@fedinskiy add vertx-dependencies to the dependencies managment and remove tcnative version or set tcnative version to 2.0.36.Final

@fedinskiy
Copy link
Author

@akoniar the second workaround works(but I suspect, that this change should be described somewhere, especially since we talk about a patch, and not a major version).
The first one is not, supposedly because boringssl is declared "test dependency"[1]
[1] https://github.com/vert-x3/vertx-dependencies/blob/master/pom.xml#L946

@akoniar
Copy link

akoniar commented Apr 21, 2021

@fedinskiy I took this version from https://repo.maven.apache.org/maven2/io/vertx/vertx-dependencies/3.9.7/vertx-dependencies-3.9.7.pom
So when you add vertex dependecies to the dep managment

<dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-dependencies</artifactId>
        <version>${vertx.version}</version>
        <scope>import</scope>
      </dependency>
    </dependencies>
 </dependencyManagement>

and add tcnative dep

<dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-tcnative-boringssl-static</artifactId>
      <scope>compile</scope>
</dependency>

Then the reproducer works (for me) (BTW this is the supported use case)

On the other hand the vertx-grpc documentation should be improved. I missing information about setting up vertx-dependecies or netty-tcnative-boringssl-static version

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

No branches or pull requests

2 participants