Tuesday, May 12, 2009

MetadataNodeNotFoundException

If you encounter a “MetadataNodeNotFoundException” on any EP page you load, there is likely something up with your Web Menus. A number of postings indicate “Check your Web Menu” or something useful to that effect. In our case we have a few developers and the AOD hadn’t been refreshed for a day or so. It took a little thinking, but looking at the Application Object list in the client and looking for any Web Controls, Web Menus, Web Menu Items or Web Modules that had changed helped us discover it was a web module:

In our case a new Web Module had been created by a developer that had no associated menus which caused the whole app to break. Unfortunately the error wasn’t terribly helpful or easy to interpret but we resolved the issue taking a step back to first principles and seeing what had changed recently. We didn't have source control in place at the time, though it likely would have more quickly identified recent changes to see what might have caused the break.

Perhaps not intuitive, however, as one might think that creating an empty web module might simply result in an empty site or at worst the web module not being loaded. Not so. In my experience many errors come from unintuitive sources and this is why this blog and others exist - to help the next poor virgin.