-
Type: Task
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Component/s: Elasticsearch
-
Tags:
-
Team:PLATFORM
Sometimes, when we get exceptions from Elasticsearch/Opensearch and we try to serialize them with Jackson we get a cycle error, see:
Both 2021 (elasticsearch) or 2023 (OpenSearch) modules are affected (so unrelated to OpenSearch upgrade):
- 2021 (es):
https://jenkins.platform.dev.nuxeo.com/job/nuxeo/job/lts/job/nuxeo/job/2021/524/testReport/junit/org.nuxeo.elasticsearch.test.rest/RestESDocumentsTest/Run_unit_tests___Run_mongodb_unit_tests___iCanPerformESQLPageProviderOnRepository/2022-12-12 21:11:41,127 [http-nio-35867-exec-1] ERROR [DefaultNuxeoExceptionHandler] com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Direct self-reference leading to cycle (through reference chain: org.nuxeo.ecm.core.api.NuxeoException["cause"]->org.elasticsearch.ElasticsearchStatusException["cause"]->org.elasticsearch.ElasticsearchException["cause"]->org.elasticsearch.ElasticsearchException["rootCause"]) com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Direct self-reference leading to cycle (through reference chain: org.nuxeo.ecm.core.api.NuxeoException["cause"]->org.elasticsearch.ElasticsearchStatusException["cause"]->org.elasticsearch.ElasticsearchException["cause"]->org.elasticsearch.ElasticsearchException["rootCause"])
- 2023 (OpenSearch):
https://jenkins.platform.dev.nuxeo.com/job/nuxeo/job/lts/job/nuxeo/job/2023/154/testReport/junit/org.nuxeo.elasticsearch.test.rest/RestESDocumentsTest/Run_unit_tests___Run_postgresql_unit_tests___iCanPerformESQLPageProviderOnRepository/2022-12-12 17:00:31,839 [http-nio-36273-exec-1] ERROR [DefaultNuxeoExceptionHandler] com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Direct self-reference leading to cycle (through reference chain: org.nuxeo.ecm.core.api.NuxeoException["cause"]->org.opensearch.OpenSearchStatusException["cause"]->org.opensearch.OpenSearchException["cause"]->org.opensearch.OpenSearchException["rootCause"]) com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Direct self-reference leading to cycle (through reference chain: org.nuxeo.ecm.core.api.NuxeoException["cause"]->org.opensearch.OpenSearchStatusException["cause"]->org.opensearch.OpenSearchException["cause"]->org.opensearch.OpenSearchException["rootCause"])