Reputation: 4147
I'm getting this error when trying to publish any item from Sitecore to the web. Was working fine the other day, not sure what I did to crash this.
Job started: Publish to 'web'|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Root item is not defined at Sitecore.Diagnostics.Assert.IsNotNull(Object value, String message)
at Sitecore.Search.Crawlers.DatabaseCrawler.Initialize(Index index)
at Sitecore.Search.Index.AddCrawler(ICrawler crawler) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties) at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) at Sitecore.Search.SearchManager.get_SearchConfiguration() at Sitecore.Data.Managers.IndexingManager.UpdateIndexAsync(Database database) at Sitecore.MainUtil.RaiseEvent[T](EventHandler1 subscribers, Object sender, T eventArgs) at Sitecore.Data.Engines.HistoryEngine.RegisterItemSaved(Item item, ItemChanges changes) at System.EventHandler
1.Invoke(Object sender, TEventArgs e) at Sitecore.Data.Engines.EngineCommand2.RaiseEvent[TArgs](EventHandler
1 handlers, Func2 argsCreator) at Sitecore.Data.Engines.EngineCommand
2.Execute() at Sitecore.Data.Engines.DataEngine.SaveItem(Item item) at Sitecore.Data.Managers.ItemProvider.SaveItem(Item item) at Sitecore.Data.Items.ItemEditing.AcceptChanges(Boolean updateStatistics, Boolean silent) at Sitecore.Data.Items.EditContext.Dispose() at Sitecore.Publishing.PublishHelper.CopyToTarget(Item sourceVersion)
at Sitecore.Publishing.PublishHelper.PublishVersionToTarget(Item sourceVersion, Item targetItem, Boolean targetCreated) at Sitecore.Publishing.Pipelines.PublishItem.PerformAction.ExecuteAction(PublishItemContext context) at Sitecore.Publishing.Pipelines.PublishItem.PerformAction.Process(PublishItemContext context) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Publishing.Pipelines.PublishItem.PublishItemPipeline.Run(PublishItemContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable
1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable
1 entries, PublishContext context) at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.Process(PublishContext context) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Publishing.Pipelines.Publish.PublishPipeline.Run(PublishContext context) at Sitecore.Publishing.Publisher.PublishWithResult()
--- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at (Object , Object[] ) at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) at Sitecore.Jobs.Job.ThreadEntry(Object state)
Upvotes: 1
Views: 3791
Reputation: 1
You can check Sitecore logs. As per my finding it is occurred because I've specified wrong username/password in connectionstrings.config. Please make sure username and password is correct.
Upvotes: 0
Reputation: 27132
It looks like the index configuration is corrupted.
Go to /sitecore/admin/showconfig.aspx
page and find:
<locations hint="list:AddCrawler">
Check every location under that node - they all should have <Root>
tag with the proper location root specified.
Upvotes: 2