xConnect - Model Conflict Exception
May 13, 2019
If xConnect and xDB aren't working in Sitecore 9 with Sitecore Commerce, check the logs and see if you can find a model conflict exception like the following:
Exception: Sitecore.XConnect.Client.XdbModelConflictException Message: One or more local models conflict with the xDB service layer.
This could be due to the commerce models needing to be added to xConnect. The following issue helped me find a solution: https://github.com/raseniero/Sitecore-v901-XP1-Scaled-Installation/issues/3
Solution
- Open Windows Explorer
- Go to [Website Root]\XConnectModels
- Copy the file Sitecore.Commerce.Connect.XConnect.Models.json
- Go to [xConnect root]\App_data\Models
- Paste the file
- Go to [xConnect root]\App_data\jobs\continuous\IndexWorker\App_data\Models
- Paste the file