# java.lang.UnsupportedOperationException on X-pack enabled ABAC system

**URL:** <https://discuss.elastic.co/t/java-lang-unsupportedoperationexception-on-x-pack-enabled-abac-system/200795>\
**Category:** Elasticsearch\
**Created:** [September 24, 2019, 6:32am UTC](https://discuss.elastic.co/t/java-lang-unsupportedoperationexception-on-x-pack-enabled-abac-system/200795 "2019-09-24T06:32:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![soumendra](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@soumendra](https://discuss.elastic.co/u/soumendra)\
**Post date:** [September 24, 2019, 6:32am UTC](https://discuss.elastic.co/t/java-lang-unsupportedoperationexception-on-x-pack-enabled-abac-system/200795/1 "2019-09-24T06:32:40Z")

</div>

KB/ES version: 7.2  
I am trying to build an ABAC security based Multi-Tenant system with X-Pack platinum license.  
There is an Index which have multiple Client's data. The Admin who has access to all three Client's data able to view the Kibana Dashboards properly. However, Users and Admin with 2 out of 3 accounts access are unable to view the dashboard.  
Whenever the user access the Dashboard the following Error pops up.

`Error: Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"unsupported_operation_exception","reason":"unsupported_operation_exception: null"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"unified_asset_processed","node":"MtkL9yGKQPyJZu3an3ICvw","reason":{"type":"unsupported_operation_exception","reason":"unsupported_operation_exception: null"}}]},"status":500}`

Detailed Logs in ES can be seen like below:

```
org.elasticsearch.transport.RemoteTransportException: [elkxx-1][ip-address:9300][indices:data/read/search[phase/query]]
Caused by: org.elasticsearch.search.query.QueryPhaseExecutionException: Query Failed [Failed to execute main query]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:306) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:114) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:335) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:360) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.search.SearchService.lambda$executeQueryPhase$1(SearchService.java:340) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.action.ActionListener.lambda$map$2(ActionListener.java:145) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62) [elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.search.SearchService$2.doRun(SearchService.java:1052) [elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:44) [elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:758) [elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-7.2.0.jar:7.2.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:835) [?:?]
Caused by: java.lang.UnsupportedOperationException
        at org.elasticsearch.search.internal.ContextIndexSearcher$1.scorer(ContextIndexSearcher.java:156) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.xpack.core.security.authz.accesscontrol.SecurityIndexSearcherWrapper$IndexSearcherWrapper.search(SecurityIndexSearcherWrapper.java:164) ~[?:?]
        at org.apache.lucene.search.XIndexSearcher.search(XIndexSearcher.java:44) ~[elasticsearch-7.2.0.jar:8.0.0 2ae4746365c1ee72a0047ced7610b2096e438979 - jimczi - 2019-03-08 11:58:55]
        at org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:177) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:443) ~[lucene-core-8.0.0.jar:8.0.0 2ae4746365c1ee72a0047ced7610b2096e438979 - jimczi - 2019-03-08 11:58:55]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:271) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:114) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:335) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:360) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.search.SearchService.lambda$executeQueryPhase$1(SearchService.java:340) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.action.ActionListener.lambda$map$2(ActionListener.java:145) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62) [elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.search.SearchService$2.doRun(SearchService.java:1052) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:44) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:758) ~[elasticsearch-7.2.0.jar:7.2.0]
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.2.0.jar:7.2.0]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:835) ~[?:?]
```

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [September 24, 2019, 7:44am UTC](https://discuss.elastic.co/t/java-lang-unsupportedoperationexception-on-x-pack-enabled-abac-system/200795/2 "2019-09-24T07:44:40Z")

</div>

Looks like you are hitting [https://github.com/elastic/elasticsearch/pull/43668](https://github.com/elastic/elasticsearch/pull/43668) that was fixed in 7.2.1 and 7.3

---

<div class="post-metadata">

**Author:** ![soumendra](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@soumendra](https://discuss.elastic.co/u/soumendra)\
**Post date:** [September 24, 2019, 11:06am UTC](https://discuss.elastic.co/t/java-lang-unsupportedoperationexception-on-x-pack-enabled-abac-system/200795/3 "2019-09-24T11:06:59Z")

</div>

Can you recommend any workaround around this issue or how to not match with a sparse role query?

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [September 24, 2019, 12:34pm UTC](https://discuss.elastic.co/t/java-lang-unsupportedoperationexception-on-x-pack-enabled-abac-system/200795/4 "2019-09-24T12:34:35Z")

</div>

Is there something that prevents you from upgrading to 7.2.1 or 7.3 ?

---

<div class="post-metadata">

**Author:** ![soumendra](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@soumendra](https://discuss.elastic.co/u/soumendra)\
**Post date:** [September 24, 2019, 12:39pm UTC](https://discuss.elastic.co/t/java-lang-unsupportedoperationexception-on-x-pack-enabled-abac-system/200795/5 "2019-09-24T12:39:22Z")

</div>

As far as I know

- We need to ingest all the data again once we upgrade the version.
- We need to enable X-Pack (SSO, SSL certificates , etc. )in there and
- Many Kibana Dashboards we need to export/import

Is there anyway we can upgrade from 7.2.0 to 7.2.1 without redoing the above steps?

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [September 24, 2019, 12:54pm UTC](https://discuss.elastic.co/t/java-lang-unsupportedoperationexception-on-x-pack-enabled-abac-system/200795/6 "2019-09-24T12:54:37Z")

</div>

> [@soumendra](#):
>
> As far as I know
> 
> - We need to ingest all the data again once we upgrade the version.
> - We need to enable X-Pack (SSO, SSL certificates , etc. )in there and
> - Many Kibana Dashboards we need to export/import

No you don't. See [Rolling upgrade | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html)

---

<div class="post-metadata">

**Author:** ![soumendra](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@soumendra](https://discuss.elastic.co/u/soumendra)\
**Post date:** [September 25, 2019, 11:04am UTC](https://discuss.elastic.co/t/java-lang-unsupportedoperationexception-on-x-pack-enabled-abac-system/200795/7 "2019-09-25T11:04:37Z")

</div>

Thanks **Ikakavas** , Upgrading the ES from 7.2.0 to 7.3.2 resolved the issue.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 23, 2019, 11:04am UTC](https://discuss.elastic.co/t/java-lang-unsupportedoperationexception-on-x-pack-enabled-abac-system/200795/8 "2019-10-23T11:04:53Z")

</div>

Closed on October 23, 2019, 11:04am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
