XdbModelException – “The type of this instance does not correspond to any type in the model”

Working with xConnect to save custom facet data, I started getting this error:

An unhandled exception of type ‘Sitecore.XConnect.Schema.XdbModelException’ occurred … The type of this instance does not correspond to any type in the model

Weirdly, the other 3 (nearly identical) facets worked just fine. Tracking down the issue was “fun”…

Digging through the XConnectClient object’s .Model property, I spotted a difference between the facet that wouldn’t work (top), and one that would (bottom):

The one that wouldn’t work doesn’t have a .ClrType . Well, it’ll need that. Nothing else seems to define the class to use. What would cause that?

Looking in my .config files, I found the relevant one – and it looks right…

… and then I noticed that it wasn’t being published. It did not appear in my Sitecore configuration (/sitecore/admin/showconfig.aspx), and it didn’t appear under the App_Config directory.

Oops.

Fixed that, error went away. If you get this, check that your configuration for the facet is a) correct, and b) being deployed.

Advertisements
XdbModelException – “The type of this instance does not correspond to any type in the model”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.