Apache Ignite缓存操作失败

时间:2017-05-03 15:16:32

标签: apache docker redis ignite jedis

我使用docker hub中的docker镜像安装了Ignite。 Ignite服务器节点正确启动。但是在尝试更新缓存时出现以下异常:

[SEVERE][rest-#35%null%][GridCacheCommandHandler] Failed to execute cache command: GridRestCacheRequest [cacheName=null, cacheFlags=0, ttl=null, super=GridRestRequest [destId=null, clientId=466b7ff5-c303-452e-8f2d-97d59c753de5, addr=null, cmd=CACHE_PUT]] class org.apache.ignite.IgniteCheckedException: Failed to find cache for given cache name (null for default cache): null at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.localCache(GridCacheCommandHandler.java:754) at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.executeCommand(GridCacheCommandHandler.java:677) at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.handleAsync(GridCacheCommandHandler.java:468) at org.apache.ignite.internal.processors.rest.GridRestProcessor.handleRequest(GridRestProcessor.java:264) at org.apache.ignite.internal.processors.rest.GridRestProcessor.access$100(GridRestProcessor.java:87) at org.apache.ignite.internal.processors.rest.GridRestProcessor$2.body(GridRestProcessor.java:153) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) [14:57:18,637][SEVERE][rest-#35%null%][GridRestProcessor] Failed to handle request: CACHE_PUT class org.apache.ignite.IgniteCheckedException: Failed to find cache for given cache name (null for default cache): null at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.localCache(GridCacheCommandHandler.java:754) at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.executeCommand(GridCacheCommandHandler.java:677) at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.handleAsync(GridCacheCommandHandler.java:468) at org.apache.ignite.internal.processors.rest.GridRestProcessor.handleRequest(GridRestProcessor.java:264) at org.apache.ignite.internal.processors.rest.GridRestProcessor.access$100(GridRestProcessor.java:87) at org.apache.ignite.internal.processors.rest.GridRestProcessor$2.body(GridRestProcessor.java:153) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

任何想法有什么不对?

1 个答案:

答案 0 :(得分:1)

您应该在开始使用之前创建缓存。使用getOrCreateCache方法。

您可以在doc中阅读更多信息,并查看使用缓存API的example

此外,apache中有很多例子可以针对各种用例点燃。