dshackle: Exception encountered during context initialization
docker tag 0.9.0
2020-01-12 02:50:17.891 | WARN | igApplicationContext | Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grpcServer': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: 'io.grpc.Deadline$Ticker io.grpc.Deadline.getSystemTicker()'
2020-01-12 02:50:17.910 | ERROR | SpringApplication | Application run failed
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
Caused by: java.lang.NoSuchMethodError: 'io.grpc.Deadline$Ticker io.grpc.Deadline.getSystemTicker()'
at io.grpc.netty.NettyServerBuilder.<init>(NettyServerBuilder.java:133) ~[grpc-netty-1.25.0.jar:1.25.0]
at io.emeraldpay.dshackle.GrpcServer.start(GrpcServer.kt:52) ~[classes/:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grpcServer': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: 'io.grpc.Deadline$Ticker io.grpc.Deadline.getSystemTicker()'
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
... 15 more
2020-01-12 02:48:08.655 | ERROR | SpringApplication | Application run failed
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at io.grpc.netty.NettyServerBuilder.forAddress(NettyServerBuilder.java:124) ~[grpc-netty-1.25.0.jar:1.25.0]
at io.emeraldpay.dshackle.GrpcServer.start(GrpcServer.kt:52) ~[classes/:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:139) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at io.grpc.netty.NettyServerBuilder.forAddress(NettyServerBuilder.java:124) ~[grpc-netty-1.25.0.jar:1.25.0]
at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
... 15 more
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
2020-01-12 02:48:08.373 | INFO | GrpcServer | Listening Native gRPC on 127.0.0.1:2449
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grpcServer': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: 'io.grpc.Deadline$Ticker io.grpc.Deadline.getSystemTicker()'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at io.grpc.internal.AbstractServerImplBuilder.<init>(AbstractServerImplBuilder.java:82) ~[grpc-core-1.25.0.jar:1.25.0]
at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at io.emeraldpay.dshackle.GrpcServer.start(GrpcServer.kt:52) ~[classes/:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
... 15 more
2020-01-12 02:51:29.499 | ERROR | SpringApplication | Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grpcServer': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: 'io.grpc.Deadline$Ticker io.grpc.Deadline.getSystemTicker()'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at io.grpc.internal.AbstractServerImplBuilder.<init>(AbstractServerImplBuilder.java:82) ~[grpc-core-1.25.0.jar:1.25.0]
Caused by: java.lang.NoSuchMethodError: 'io.grpc.Deadline$Ticker io.grpc.Deadline.getSystemTicker()'
at io.grpc.netty.NettyServerBuilder.forAddress(NettyServerBuilder.java:124) ~[grpc-netty-1.25.0.jar:1.25.0]
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (17 by maintainers)
Commits related to this issue
- problem: duplicate grpc classes, from different versions rel: #74 — committed to emeraldpay/dshackle by splix 4 years ago
- problem: duplicate grpc classes, from different versions rel: #74 — committed to emeraldpay/dshackle by splix 4 years ago
- Merge pull request #74 from p2p-org/debug-null-nativecall-result trying to find null in response — committed to jit-strategies/dshackle by a10zn8 2 years ago
I think I found the issue. Another lib also includes that class in their lib (and it should never do that). And the error happens randomly only because of the order of loading of classes, which is not defined for such situations. So you see only on some machines.