November Happy Hour will be moved to Thursday December 5th.

Exception when running indexing job

Vote:
 

When I try to run the indexing job I get the following errors:

An exception occured while indexing (Batch): Object reference not set to an instance of an object. (see log for more information) 

The index is successfully built for some of the items, but some page types are excluded from the index because of this error I guess.

The log doesn't give much information as far as I can see:

ERROR EPiServer.Find.Cms.ContentIndexer: An exception occured while indexing (Batch): Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at lambda_method(Closure , ILocalizable )
at EPiServer.Find.DelegateValueProvider`2.GetValue(Object target)
at EPiServer.Find.ClientConventions.FieldConventionBuilder`1.<>c__DisplayClass2.<>c__DisplayClass4.<ConvertBeforeSerializing>b__1(Object instance)
at EPiServer.Find.DelegateValueProvider.GetValue(Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value)
at Newtonsoft.Json.Serialization.JsonSerializerProxy.SerializeInternal(JsonWriter jsonWriter, Object value)
at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value)
at EPiServer.Find.Api.BulkActionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value)
at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value)
at EPiServer.Find.Json.Serializer.SerializeToStringBuilder(JsonSerializer serializer, Object value, StringBuilder buffer)
at EPiServer.Find.Api.BulkCommand.Execute()
at EPiServer.Find.Client.Index(IEnumerable objectsToIndex)
at EPiServer.Find.Cms.ContentIndexer.Index(IEnumerable`1 content, IndexOptions options)
at EPiServer.Find.Cms.ContentIndexer.<>c__DisplayClass16.<ReIndex>b__e(Object x)

 

Any input would be appreciated. Thanks.

#81966
Mar 02, 2014 22:34
Vote:
 

Do the page types that fail have any unusual properties? Do you get the error when indexing one page at a time? If you publish a page of that type for instance.

#82055
Mar 04, 2014 19:55
Vote:
 

Thanks for poitning me in the right direction. There were actually a legacy property that were causing problems, in our case we didn't really need to index that property so adding [JsonIgnore] resolved the issue for us.

Thanks!

#82167
Mar 06, 2014 11:06
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.