After installing SXA, the following message might be found in Content Delivery (CD) server logs after startup:
33188 10:07:04 ERROR Error loading hook: <hook type="Sitecore.XA.Foundation.Upgrade.Hooks.VersionInitializer, Sitecore.XA.Foundation.Upgrade" patch:source="Sitecore.XA.Foundation.Upgrade.config" xmlns:patch="http://www.sitecore.net/xmlconfig/" />
Exception: System.InvalidOperationException
Message: Could not find configuration node: databases/database[@id='master']
Source: Sitecore.Kernel
at Sitecore.Configuration.DefaultFactory.GetConfigNode(String xpath, Boolean assert)
at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.Configuration.DefaultFactory.GetDatabase(String name, Boolean assert)
at Sitecore.Configuration.DefaultFactory.GetDatabase(String name)
at Sitecore.XA.Foundation.Upgrade.Hooks.VersionInitializer.Initialize()
at Sitecore.Events.Hooks.HookManager.LoadAll()
The message appears only when the instance starts, and it can be safely ignored. To avoid such messages, you can use the solution below.
The issue affects SXA 10.2.0.
To remove errors from CD logs:
<hooks>
<hook type="Sitecore.XA.Foundation.Upgrade.Hooks.VersionInitializer, Sitecore.XA.Foundation.Upgrade" />
</hooks>