Legacy Knowledge Base
Published Jul. 2, 2025

Saving the segment causes StackOverflowError in Elasticsearch

Written By

Sivakumar Perumal

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How to articles!

While we make every effort to ensure this Knowledge Base is accurate,it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Selecting a condition as parent organization in Organization segment contributor is not working when there are more sub-organizations

    Steps to reproduce:

    1. Create an Organization
    2. Create 1800-2000 sub-organization for the above created organization.
    3. Create a Segment by dragging "Parent Organization" property. Then select the field as "equals" and choose the parent organization and click on Save.

    Expected behavior: Saving the segment works flawlessly.

    Actual behavior: Saving the segment causes StackOverflowError

    In Liferay:
    
    2020-04-06 12:31:09.219 ERROR [liferay/search_writer/SYSTEM_ENGINE-35][ElasticsearchIndexWriter:143] java.lang.RuntimeException: org.elasticsearch.client.transport.NoNodeAvailableException: NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{2IwRrBrbSUulEqEDniVznA}{localhost}{127.0.0.1:9300}]]
    java.lang.RuntimeException: org.elasticsearch.client.transport.NoNodeAvailableException: NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{2IwRrBrbSUulEqEDniVznA}{localhost}{127.0.0.1:9300}]]
     at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:349)
     at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:247)
     at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:60)
     at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:382)
     at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:395)
     at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:384)
     at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1242)
     at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:46)
     at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:53)
     at com.liferay.portal.search.elasticsearch6.internal.search.engine.adapter.index.RefreshIndexRequestExecutorImpl.execute(RefreshIndexRequestExecutorImpl.java:47)
     at com.liferay.portal.search.elasticsearch6.internal.search.engine.adapter.index.ElasticsearchIndexRequestExecutor.executeIndexRequest(ElasticsearchIndexRequestExecutor.java:140)
     at com.liferay.portal.search.engine.adapter.index.RefreshIndexRequest.accept(RefreshIndexRequest.java:36)
     at com.liferay.portal.search.engine.adapter.index.RefreshIndexRequest.accept(RefreshIndexRequest.java:22)
     at com.liferay.portal.search.elasticsearch6.internal.search.engine.adapter.ElasticsearchSearchEngineAdapterImpl.execute(ElasticsearchSearchEngineAdapterImpl.java:78)
     at com.liferay.portal.search.elasticsearch6.internal.ElasticsearchIndexWriter.commit(ElasticsearchIndexWriter.java:139)
     at sun.reflect.GeneratedMethodAccessor376.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:498)
     at com.liferay.portal.kernel.messaging.proxy.ProxyRequest.execute(ProxyRequest.java:82)
     at com.liferay.portal.kernel.messaging.proxy.ProxyMessageListener.receive(ProxyMessageListener.java:58)
     at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
     at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
     at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:752)
     at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
     at java.lang.Thread.run(Thread.java:748) 
    
    In Elastic search server:
    
    [2020-04-06T17:30:32,742][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [qMwTfT8] fatal error in thread [Thread-51], exiting
    java.lang.StackOverflowError: null
     at org.elasticsearch.common.io.stream.NamedWriteableRegistry.getReader(NamedWriteableRegistry.java:105) ~[elasticsearch-6.8.0.jar:6.8.0]
     at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:45) ~[elasticsearch-6.8.0.jar:6.8.0]
     at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:39) ~[elasticsearch-6.8.0.jar:6.8.0]
     at org.elasticsearch.index.query.AbstractQueryBuilder.readQueries(AbstractQueryBuilder.java:277) ~[elasticsearch-6.8.0.jar:6.8.0]
     at org.elasticsearch.index.query.BoolQueryBuilder.<init>(BoolQueryBuilder.java:95) ~[elasticsearch-6.8.0.jar:6.8.0]
     at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:46) ~[elasticsearch-6.8.0.jar:6.8.0]
     at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:39) ~[elasticsearch-6.8.0.jar:6.8.0]
     at org.elasticsearch.index.query.AbstractQueryBuilder.readQueries(AbstractQueryBuilder.java:277) ~[elasticsearch-6.8.0.jar:6.8.0]
     at org.elasticsearch.index.query.BoolQueryBuilder.<init>(BoolQueryBuilder.java:95) ~[elasticsearch-6.8.0.jar:6.8.0]
     at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:46) ~[elasticsearch-6.8.0.jar:6.8.0]
     at org.elasticsearch.common.io.stream.NamedWriteableAwareStreamInput.readNamedWriteable(NamedWriteableAwareStreamInput.java:39) ~[elasticsearch-6.8.0.jar:6.8.0]

Environment

  • Liferay DXP 7.2

Resolution

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base