You need to add a dependency on grpc-api (or make sure that you have the
1.57.2 version of it).

On Fri, Aug 18, 2023 at 7:31 AM 'Mike Yawn' via grpc.io <
grpc-io@googlegroups.com> wrote:

> I have a demo program that shows building microservices with Hazelcast +
> gRPC that works fine using gRPC 1.48.0.
>
> My build system advised that due to CVEs I should upgrade, so I moved to
> 1.57.2.  Modules upgraded are grpc-netty-shaded (this is the one where the
> CVE was reported) as well as grpc-stub, grpc-protobuf, and protobuf-java
> (which was upgraded from 3.21.1 to 3.21.7).
>
> After the upgrade, the server startup fails with the following stack trace:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> io/grpc/InternalGlobalInterceptors
> at
> io.grpc.internal.ServerImplBuilder.getTracerFactories(ServerImplBuilder.java:252)
> at io.grpc.internal.ServerImplBuilder.build(ServerImplBuilder.java:243)
> at
> io.grpc.internal.AbstractServerImplBuilder.build(AbstractServerImplBuilder.java:217)
> at org.example.grpc.GrpcServer.<init>(GrpcServer.java:42)
> at
> org.hazelcast.msfdemo.invsvc.service.InventoryService.main(InventoryService.java:118)
> Caused by: java.lang.ClassNotFoundException:
> io.grpc.InternalGlobalInterceptors
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
> at
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
> ... 5 more
>
> The server startup code is:
>
> server = Grpc.newServerBuilderForPort(port, InsecureServerCredentials.
> create())
> .executor(Executors.newFixedThreadPool(16))
> .addService(service)
> .build();
>
> Any idea what I need to change to resolve this?
>
> Thanks!
> Mike
>
>
> This message contains confidential information and is intended only for
> the individuals named. If you are not the named addressee you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately by e-mail if you have received this e-mail by mistake and
> delete this e-mail from your system. E-mail transmission cannot be
> guaranteed to be secure or error-free as information could be intercepted,
> corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
> The sender therefore does not accept liability for any errors or omissions
> in the contents of this message, which arise as a result of e-mail
> transmission. If verification is required, please request a hard-copy
> version. -Hazelcast
>
> --
> You received this message because you are subscribed to the Google Groups "
> grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grpc-io+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/57071bff-d83a-4240-8d50-9fab9b18b355n%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/57071bff-d83a-4240-8d50-9fab9b18b355n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CANuT3qV8fXmtKxfvkL_dxDJ%3DiZ5xvG966OOdMqQsihJbe7GE-g%40mail.gmail.com.

Reply via email to