U4-8766 - v7.5.0-beta2 exception from Examine Grid Indexer

Created by Jeavon Leopold 22 Jul 2016, 18:46:04 Updated by Claus Jensen 09 Aug 2016, 07:50:17

Tags: Unscheduled

On a small site running v7.5.0-beta2 with absolutely no grid usage I'm getting a few of these exceptions in the logs:

Provider=ExternalIndexer, NodeId=-1 System.Exception: Error indexing queue items,System.InvalidCastException: Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'Newtonsoft.Json.Linq.JObject'. at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Umbraco.Web.PropertyEditors.GridPropertyEditor.DocumentWriting(Object sender, DocumentWritingEventArgs e) at Examine.LuceneEngine.Providers.LuceneIndexer.OnDocumentWriting(DocumentWritingEventArgs docArgs) in X:\Projects\Examine\Examine\Projects\Examine\LuceneEngine\Providers\LuceneIndexer.cs:line 570 at UmbracoExamine.UmbracoContentIndexer.OnDocumentWriting(DocumentWritingEventArgs docArgs) at Examine.LuceneEngine.Providers.LuceneIndexer.AddDocument(Dictionary2 fields, IndexWriter writer, Int32 nodeId, String type) in X:\Projects\Examine\Examine\Projects\Examine\LuceneEngine\Providers\LuceneIndexer.cs:line 1276 at Examine.LuceneEngine.Providers.LuceneIndexer.ProcessIndexQueueItem(IndexOperation op, IndexWriter writer) in X:\Projects\Examine\Examine\Projects\Examine\LuceneEngine\Providers\LuceneIndexer.cs:line 1784 at Examine.LuceneEngine.Providers.LuceneIndexer.ProcessQueueItem(IndexOperation item, ICollection1 indexedNodes, IndexWriter writer) in X:\Projects\Examine\Examine\Projects\Examine\LuceneEngine\Providers\LuceneIndexer.cs:line 1531 at Examine.LuceneEngine.Providers.LuceneIndexer.ForceProcessQueueItems(Boolean block) in X:\Projects\Examine\Examine\Projects\Examine\LuceneEngine\Providers\LuceneIndexer.cs:line 1486, IndexSet: ExternalIndexSet

Comments

Karl Kopp 08 Aug 2016, 09:43:06

Ditto! I'm using the U7 Grid Data type (https://our.umbraco.org/projects/backoffice-extensions/u7-grid-data-type/) and get the same error.

2016-08-08 19:37:58,485 [16] ERROR UmbracoExamine.DataServices.UmbracoLogService - Provider=InternalIndexer, NodeId=-1 System.Exception: Error indexing queue items,System.InvalidCastException: Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'Newtonsoft.Json.Linq.JObject'. at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Umbraco.Web.PropertyEditors.GridPropertyEditor.DocumentWriting(Object sender, DocumentWritingEventArgs e) at System.EventHandler1.Invoke(Object sender, TEventArgs e) at Examine.LuceneEngine.Providers.LuceneIndexer.OnDocumentWriting(DocumentWritingEventArgs docArgs) at UmbracoExamine.UmbracoContentIndexer.OnDocumentWriting(DocumentWritingEventArgs docArgs) at Examine.LuceneEngine.Providers.LuceneIndexer.AddDocument(Dictionary2 fields, IndexWriter writer, Int32 nodeId, String type) at Examine.LuceneEngine.Providers.LuceneIndexer.ProcessIndexQueueItem(IndexOperation op, IndexWriter writer) at Examine.LuceneEngine.Providers.LuceneIndexer.ProcessQueueItem(IndexOperation item, ICollection1 indexedNodes, IndexWriter writer) at Examine.LuceneEngine.Providers.LuceneIndexer.ForceProcessQueueItems(Boolean block), IndexSet: InternalIndexSet 2016-08-08 19:37:58,489 [16] ERROR UmbracoExamine.DataServices.UmbracoLogService - Provider=ExternalIndexer, NodeId=-1 System.Exception: Error indexing queue items,System.InvalidCastException: Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'Newtonsoft.Json.Linq.JObject'. at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Umbraco.Web.PropertyEditors.GridPropertyEditor.DocumentWriting(Object sender, DocumentWritingEventArgs e) at Examine.LuceneEngine.Providers.LuceneIndexer.OnDocumentWriting(DocumentWritingEventArgs docArgs) at UmbracoExamine.UmbracoContentIndexer.OnDocumentWriting(DocumentWritingEventArgs docArgs) at Examine.LuceneEngine.Providers.LuceneIndexer.AddDocument(Dictionary2 fields, IndexWriter writer, Int32 nodeId, String type) at Examine.LuceneEngine.Providers.LuceneIndexer.ProcessIndexQueueItem(IndexOperation op, IndexWriter writer) at Examine.LuceneEngine.Providers.LuceneIndexer.ProcessQueueItem(IndexOperation item, ICollection`1 indexedNodes, IndexWriter writer) at Examine.LuceneEngine.Providers.LuceneIndexer.ForceProcessQueueItems(Boolean block), IndexSet: ExternalIndexSet


Shannon Deminick 09 Aug 2016, 07:41:00

Fixed in rev: 910e6b7a64cb235f9221594b27d7c943b8c5b715 We were catching a JsonException but not an InvalidCastException which I've now added


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.5.0

Due in version: 7.5.0

Sprint: Sprint 39

Story Points:

Cycle: