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

NPE in vertx-redis-client 4.3.0 #437

Closed
xiaojianhx opened this issue May 17, 2022 · 1 comment
Closed

NPE in vertx-redis-client 4.3.0 #437

xiaojianhx opened this issue May 17, 2022 · 1 comment
Labels

Comments

@xiaojianhx
Copy link

xiaojianhx commented May 17, 2022

There is an exception: Exception in thread "main" java.lang.NullPointerException: Cannot invoke "io.vertx.core.impl.ContextInternal.nettyEventLoop()" because "this.context" is null

jdk version:17
vertx-redis-client version: 4.3.0

    public static void main(String[] args) {

        var vertx = Vertx.vertx();
        api = RedisAPI.api(Redis.createClient(vertx, "redis://:abracadabra@localhost:6379/1"));
        api.incr("a").onSuccess(r -> {
            System.out.println(r);
        });
    }

In vertx-redis-client version: 4.2.7, it can run。How to use in 4.3.0?

@xiaojianhx xiaojianhx added the bug label May 17, 2022
@pmlopes
Copy link
Member

pmlopes commented May 19, 2022

This was fixed on master. To workaround it run the code inside a vert.x context

@pmlopes pmlopes closed this as completed May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants