Hello All,
This was the error that I faced while running the Solr Indexing (full indexing). And below is the error log, that I observed in the logs.
WARN [solr indexer thread] [JaloSession] There are some active local session contexts left (1) for tenant master, this might indicate there are not properly freed localsession context instances.
INFO | jvm 1 | main | 2023/08/16 04:57:14.896 | WARN [00002TWC::de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob] (00002TWC) [SolrIndexerJob] Error during indexer call: KarmaParts21GS6Index
INFO | jvm 1 | main | 2023/08/16 04:57:14.896 | de.hybris.platform.solrfacetsearch.indexer.exceptions.IndexerException: Indexer worker failed. Max number of retries in total has been reached
INFO | jvm 1 | main | 2023/08/16 04:57:14.896 | at de.hybris.platform.solrfacetsearch.indexer.strategies.impl.DefaultIndexerStrategy.runWorkers(DefaultIndexerStrategy.java:144) ~[solrfacetsearchserver.jar:?]
The nested exception is:
Caused by: java.util.concurrent.ExecutionException: java.lang.StackOverflowError
INFO | jvm 1 | main | 2023/08/16 04:57:14.896 | at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_211]
INFO | jvm 1 | main | 2023/08/16 04:57:14.896 | at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_211]
INFO | jvm 1 | main | 2023/08/16 04:57:14.896 | at de.hybris.platform.solrfacetsearch.indexer.strategies.impl.DefaultIndexerStrategy.runWorkers(DefaultIndexerStrategy.java:131) ~[solrfacetsearchserver.jar:?]
INFO | jvm 1 | main | 2023/08/16 04:57:14.896 | ... 12 more
INFO | jvm 1 | main | 2023/08/16 04:57:14.896 | Caused by: java.lang.StackOverflowError
INFO | jvm 1 | main | 2023/08/16 04:57:14.896 | at de.hybris.platform.category.impl.DefaultCategoryService.getAllSupercategories(DefaultCategoryService.java:352) ~[classes/:?]
For this error, I have gone through lots of blogs and haven't found any. So I dig into the code and check it in hmc, why am unable to fetch supercategories.
Solution:
There might be a chance of either data error. or the category tree structure itself is not formed well.
In my case, In HMC- there are two supercategories that exist in the tree structure.
Go to HMC->Catalog->Categories->Enter your category number(identifier) and its catalog version (This category number is the one in which you get an error while running the solr). And keep a backup of the category.
Then delete the entire category. (Here, why am deleting the category is, in the error log it is showing that unable to fetch super categories. This means, there are more than one category exists. So, the Solr is unable to choose which category needs to fetch. That is why it is unable to run it.)
And ran the Solr indexing again and checked still getting the error.
Finally, re-import/ upload the whole category again. And Then the issue was resolved.