Issue with old file in elasticsearch

Hi!

I am having some assembly reference problem with a file i created and deleted a while a go that should not be in use. This happens when i update the index documents in BackOffice.

I have tried cleaning the project, deleting bin/obj files, search for the file in the project, remove the project and so on… but doesn’t seem to help

From log:

Could not load type ‘Litium.Accelerator.Search.OrganizationDocument’ from assembly ‘Litium.Accelerator.Elasticsearch’. Elasticsearch.Net.UnexpectedElasticsearchClientException: Could not load type ‘Litium.Accelerator.Search.OrganizationDocument’ from assembly ‘Litium.Accelerator.Elasticsearch’. —> System.TypeLoadException: Could not load type ‘Litium.Accelerator.Search.OrganizationDocument’ from assembly ‘Litium.Accelerator.Elasticsearch’. at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) at System.Type.GetType(String typeName, Boolean throwOnError) at Elasticsearch.Net.Utf8Json.Formatters.TypeFormatter.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Utf8Json\Formatters\StandardClassLibraryFormatters.cs:line 542 at Deserialize(Object , JsonReader& , IJsonFormatterResolver ) at Elasticsearch.Net.Utf8Json.JsonSerializer.Deserialize[T](Byte bytes, Int32 offset, IJsonFormatterResolver resolver) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Utf8Json\JsonSerializer.cs:line 262 at Elasticsearch.Net.Utf8Json.JsonSerializer.Deserialize[T](Stream stream, IJsonFormatterResolver resolver) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Utf8Json\JsonSerializer.cs:line 329 at Elasticsearch.Net.DiagnosticsSerializerProxy.Deserialize[T](Stream stream) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Serialization\DiagnosticsSerializerProxy.cs:line 65 at Nest.SourceFormatter1.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver) in c:\Projects\elastic\net-7\src\Nest\CommonAbstractions\SerializationBehavior\JsonFormatters\SourceFormatter.cs:line 25 at Deserialize(Object[] , JsonReader& , IJsonFormatterResolver ) at Nest.ReadAsFormatter2.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver) in c:\Projects\elastic\net-7\src\Nest\CommonAbstractions\SerializationBehavior\JsonFormatters\ReadAsFormatterResolver.cs:line 54 at Elasticsearch.Net.Utf8Json.Formatters.CollectionFormatterBase4.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Utf8Json\Formatters\CollectionFormatters.cs:line 248 at Deserialize(Object[] , JsonReader& , IJsonFormatterResolver ) at Nest.ReadAsFormatter2.Deserialize(JsonReader& reader, IJsonFormatterResolver formatterResolver) in c:\Projects\elastic\net-7\src\Nest\CommonAbstractions\SerializationBehavior\JsonFormatters\ReadAsFormatterResolver.cs:line 54 at Deserialize(Object , JsonReader& , IJsonFormatterResolver ) at Elasticsearch.Net.Utf8Json.JsonSerializer.Deserialize[T](Byte bytes, Int32 offset, IJsonFormatterResolver resolver) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Utf8Json\JsonSerializer.cs:line 262 at Elasticsearch.Net.Utf8Json.JsonSerializer.Deserialize[T](Stream stream, IJsonFormatterResolver resolver) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Utf8Json\JsonSerializer.cs:line 329 at Elasticsearch.Net.DiagnosticsSerializerProxy.Deserialize[T](Stream stream) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Serialization\DiagnosticsSerializerProxy.cs:line 65 at Elasticsearch.Net.ResponseBuilder.SetBody[TResponse](ApiCallDetails details, RequestData requestData, Stream responseStream, String mimeType) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Transport\Pipeline\ResponseBuilder.cs:line 113 at Elasticsearch.Net.ResponseBuilder.ToResponse[TResponse](RequestData requestData, Exception ex, Nullable1 statusCode, IEnumerable1 warnings, Stream responseStream, String mimeType) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Transport\Pipeline\ResponseBuilder.cs:line 28 at Elasticsearch.Net.HttpWebRequestConnection.Request[TResponse](RequestData requestData) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Connection\HttpWebRequestConnection.cs:line 73 at Elasticsearch.Net.RequestPipeline.CallElasticsearch[TResponse](RequestData requestData) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:line 168 at Elasticsearch.Net.Transport1.Request[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Transport\Transport.cs:line 73 --- End of inner exception stack trace --- at Elasticsearch.Net.Transport1.Request[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters) in c:\Projects\elastic\net-7\src\Elasticsearch.Net\Transport\Transport.cs:line 91 at Nest.ElasticClient.Search[TDocument](ISearchRequest request) in c:\Projects\elastic\net-7\src\Nest\ElasticClient.NoNamespace.cs:line 969 at Litium.Application.Search.Indexing.IndexQueueServiceImpl.ElasticQueue.g__RefreshIndex|8_1() at Litium.Application.Search.Indexing.IndexQueueServiceImpl.ElasticQueue.b__8_0() at Litium.Application.Common.FifoExecution.WorkItem.<>c.<.cctor>b__7_0(Object s) at Litium.Application.Common.FifoExecution.WorkItem.Execute() at Litium.Application.Common.FifoExecution.ProcessQueuedItems(Object ignored)

Litium version: 7.6.1

Does the OrganizationDocument show up in BO?
If you increment the prefix, does the problem go away?

1 Like

OrganizationDocument didn’t show up in BO, but changing the prefix seemed to help. Is this related to some caching maybe in elastic?

If you created the OrganizationDocument and deleted that again, it may be that the indexing queue still have references to that document type that will causing this error logs.

1 Like

Alright! thanks!

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