Closed kotharironak closed 4 years ago
Was getting below exception after updating the submodules,
java.util.ServiceConfigurationError: io.grpc.ServerProvider: io.grpc.netty.shaded.io.grpc.netty.NettyServerProvider Unable to get public no-arg constructor
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:581)
at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:672)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1232)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
at io.grpc.ServiceProviders.loadAll(ServiceProviders.java:67)
at io.grpc.ServiceProviders.load(ServiceProviders.java:42)
at io.grpc.ServerProvider.<clinit>(ServerProvider.java:37)
at io.grpc.ServerBuilder.forPort(ServerBuilder.java:41)
at org.hypertrace.service.HypertraceService.doInit(HypertraceService.java:60)
at org.hypertrace.core.serviceframework.PlatformService.initialize(PlatformService.java:101)
at org.hypertrace.core.serviceframework.PlatformServiceLauncher.main(PlatformServiceLauncher.java:27)
Caused by: java.lang.NoClassDefFoundError: io/grpc/internal/AbstractServerImplBuilder
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3138)
at java.base/java.lang.Class.getConstructor0(Class.java:3343)
at java.base/java.lang.Class.getConstructor(Class.java:2152)
at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:659)
at java.base/java.util.ServiceLoader$1.run(ServiceLoader.java:656)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.ServiceLoader.getConstructor(ServiceLoader.java:667)
... 11 more
Caused by: java.lang.ClassNotFoundException: io.grpc.internal.AbstractServerImplBuilder
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 28 more
For now, restricted to grpc 1.30.2 version to address this. hypertrace-core-graphql-platform
was bringing 1.33.0
deps on grpc.
I guess this is the fix but I wonder how do we make sure we detect such bugs and ultimately avoid then in first place. This is a +1 for monorepo too.
On Thu, 22 Oct 2020, 08:42 Buchi Reddy Busi Reddy, notifications@github.com wrote: