You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the exactly same example code from java redis example. I use maven to compile and package.
final RedisClient client = RedisClient.create(vertx,
new RedisOptions().setHost("127.0.0.1"));
java.lang.NullPointerException
at io.vertx.redis.impl.AbstractRedisClient.<init>(AbstractRedisClient.java:44)
at io.vertx.redis.impl.RedisClientImpl.<init>(RedisClientImpl.java:39)
at io.vertx.redis.RedisClient.create(RedisClient.java:49)
at ccproject.q2.<init>(q2.java:54)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at io.vertx.core.impl.JavaVerticleFactory.createVerticle(JavaVerticleFactory.java:44)
at io.vertx.core.impl.DeploymentManager.createVerticles(DeploymentManager.java:186)
at io.vertx.core.impl.DeploymentManager.lambda$doDeployVerticle$153(DeploymentManager.java:159)
at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:135)
at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100)
at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:132)
at io.vertx.core.impl.DeploymentManager.doDeployVerticle(DeploymentManager.java:104)
at io.vertx.core.impl.DeploymentManager.deployVerticle(DeploymentManager.java:92)
at io.vertx.core.impl.VertxImpl.deployVerticle(VertxImpl.java:557)
at io.vertx.core.Starter.runVerticle(Starter.java:333)
at io.vertx.core.Starter.run(Starter.java:130)
at io.vertx.core.Starter.main(Starter.java:101)
I solved it. Redis.create should be inside start()
The text was updated successfully, but these errors were encountered:
I used the exactly same example code from java redis example. I use maven to compile and package.
I solved it. Redis.create should be inside start()
The text was updated successfully, but these errors were encountered: