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

NoClassDefFoundError: reactor/core/scheduler/Schedulers #10

Closed
bobbyfu opened this issue Dec 6, 2017 · 1 comment
Closed

NoClassDefFoundError: reactor/core/scheduler/Schedulers #10

bobbyfu opened this issue Dec 6, 2017 · 1 comment

Comments

@bobbyfu
Copy link

bobbyfu commented Dec 6, 2017

I have the following dependencies in the gradle file.

dependencies {
. . .
// 'ratelimitj-redis-0.4.1.jar'
compile ('io.projectreactor:reactor-core:3.1.2.RELEASE')
compile ('es.moki.ratelimitj:ratelimitj-redis:0.4.1')
. . .
}
The first line throws me an NoClassDefFoundError. Any idea to workaround this?

RedisClient client = RedisClient.create(RedisURI.create("localhost", 6379));

Caused by: java.lang.NoClassDefFoundError: reactor/core/scheduler/Schedulers
at io.lettuce.core.resource.DefaultClientResources.(DefaultClientResources.java:171)
at io.lettuce.core.resource.DefaultClientResources$Builder.build(DefaultClientResources.java:461)
at io.lettuce.core.resource.DefaultClientResources.create(DefaultClientResources.java:229)
at io.lettuce.core.AbstractRedisClient.(AbstractRedisClient.java:96)
at io.lettuce.core.RedisClient.(RedisClient.java:86)
at io.lettuce.core.RedisClient.create(RedisClient.java:123)
at io.squelch.collector.api.controller.OAuthController.health(OAuthController.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)

@bobbyfu
Copy link
Author

bobbyfu commented Dec 7, 2017

I found the issue. I have multiple version of the io.projectreactor:reactor-core libraries in the classpath. Removed the older version of the reactor-core dependency fixed the problem.

@bobbyfu bobbyfu closed this as completed Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant