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

Cannot resolve Jedis client classes with Grails 4 #83

Closed
andersaaberg opened this issue Jul 16, 2019 · 5 comments
Closed

Cannot resolve Jedis client classes with Grails 4 #83

andersaaberg opened this issue Jul 16, 2019 · 5 comments
Assignees

Comments

@andersaaberg
Copy link

Lets say that I have this simple controller in Grails 3:

import grails.plugins.redis.RedisService
import redis.clients.jedis.Jedis

class HelloController {

    RedisService redisService

    def index() {
        redisService.withRedis { Jedis redis ->
            redis.ping()
        }
    }
}

this works in Grails 3.3.10 but not in Grails 4.0.0 where "./gradlew bootRun" fails with this compilation error: "unable to resolve class redis.clients.jedis.Jedis".
This is a bit odd, as redis.clients:jedis should be available in Grails 4.0.0 according to ./gradlew dependencies.

This has forced me to use "micronaut-redis-lettuce" instead of this grails-plugin with Grails 4.0.0.

@andersaaberg
Copy link
Author

This is probably due to that transitive dependencies are no longer resolved for plugins: http:https://docs.grails.org/latest/guide/upgrading.html#_upgrading_to_gradle_5
https://docs.gradle.org/current/userguide/upgrading_version_4.html#rel5.0:pom_compile_runtime_separation

@puneetbehl puneetbehl self-assigned this Apr 6, 2020
@dsvyrjm
Copy link

dsvyrjm commented Nov 29, 2021

As per @andersaaberg answer, we need to add explicit dependency in build.gradle:

...
implementation 'redis.clients:jedis:2.9.0'
...

2.9.0 version took from the redis:2.0.5 sources

@puneetbehl
Copy link
Contributor

Could you please verify if this is still an issue with current active version?

@Richardson-e
Copy link

Richardson-e commented Feb 12, 2024

@puneetbehl Using grails 6.1.0 and adding the dependencies

implementation 'org.grails.plugins:grails-redis:3.0.0'
implementation 'redis.clients:jedis:2.9.0'

a project with a basic controller like the one mentioned in the original comment will compile as expected.

@puneetbehl
Copy link
Contributor

@andersaaberg Please upgrade to the most recent version of the Grails framework and this plugin.

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

4 participants