Reputation: 11
I've installed Ignite using a docker image from docker hub. Ignite server node starts correctly. But I get the following exception when trying to update cache:
[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)
Any ideas what is wrong?
Upvotes: 0
Views: 1322
Reputation: 3017
You should create cache before you will start using it. Use getOrCreateCache method.
You could read more information in doc and check this example which use cache api.
Also, there are a lot examples in apache ignite for various use cases.
Upvotes: 2