Aleksandr created IGNITE-5643: --------------------------------- Summary: REST API, call cache command without cacheName param - got java.lang.NullPointerException Key: IGNITE-5643 URL: https://issues.apache.org/jira/browse/IGNITE-5643 Project: Ignite Issue Type: Bug Affects Versions: 2.0 Environment: any Reporter: Aleksandr Priority: Minor
Steps to reproduce: 1) start Ignite with REST API enabled 2) run: curl http://localhost:8080/ignite?cmd=cache 3) got on server: [18:50:42,296][SEVERE][qtp1985938863-60][GridJettyRestProtocol] Failed to process HTTP request [action=/ignite, req=(GET /ignite?cmd=cache)@359127791 org.eclipse.jetty.server.Request@1567daef] class org.apache.ignite.IgniteCheckedException: null at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7242) at org.apache.ignite.internal.processors.rest.GridRestProcessor$2.body(GridRestProcessor.java:172) 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:748) Caused by: java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) at org.apache.ignite.internal.processors.cache.GridCacheProcessor.cache(GridCacheProcessor.java:3439) at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.localCache(GridCacheCommandHandler.java:752) at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.executeCommand(GridCacheCommandHandler.java:716) at org.apache.ignite.internal.processors.rest.handlers.cache.GridCacheCommandHandler.handleAsync(GridCacheCommandHandler.java:582) at org.apache.ignite.internal.processors.rest.GridRestProcessor.handleRequest(GridRestProcessor.java:266) at org.apache.ignite.internal.processors.rest.GridRestProcessor.access$100(GridRestProcessor.java:89) at org.apache.ignite.internal.processors.rest.GridRestProcessor$2.body(GridRestProcessor.java:155) 4) HTTP response body: { "successStatus": 1, "error": null, "response": null, "sessionToken": null } 5) Documentation tells cacheName is optional: https://apacheignite.readme.io/docs/rest-api#section-cache-metrics -- This message was sent by Atlassian JIRA (v6.4.14#64029)