BizTalk Mapper: The map contains a reference to a schema node that is not valid. Perhaps the schema has changed. Try reloading the map in the BizTalk Mapper.

A few weeks ago, while improving an existing solution to fulfill the new business requirements, I encountered the following error while trying to validate or test a BizTalk map:

Exception Caught: The map contains a reference to a schema node that is not valid.  Perhaps the schema has changed.  Try reloading the map in the BizTalk Mapper.  The XSD XPath of the node is: /*[local-name()='<Schema>’]/*[local-name()=’MyRootNode’]/*[local-name()=’MyRecord]/*[local-name()=’MyElement’]

To contextualize the problem, the BizTalk Visual Studio solution I was working on was composed of several projects, but for the propose of this error, let’s say that we had two projects:

  • Schemas Project: containing all the schemas used by the BizTalk Solution;
  • Map Project: containing all the maps used by the BizTalk Solution;

I did the necessary changes in the source schema and they were automatically reflected in the map that I was working on without the need to rebuild the Schema Project. And when I try to test the map, after making all the necessary changes on it, I got the above error.

Which was a little awkward at the point because indeed I changed the contract of the source schema but it was reflected in the map that I was working on. Everything seemed fine, I even try to close and open the map again, but that did not solve the problem

Causes

Again, the reason for this error is awkward because the schemas changes were reflected on the map, even if it was a different solution and without rebuilding the Schema Solution. However, the cause for this error is that is referring an invalid or incorrect version of the Schema assembly.

Solution

The solution to solve “The map contains a reference to a schema node that is not valid” issue is simple, you just need to rebuild the entire solution or rebuild the schema project before you try to validate or test the maps.

After the Schema project solution is rebuilt, the problem will disappear and you will be able to validate or test the map.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

1 thought on “BizTalk Mapper: The map contains a reference to a schema node that is not valid. Perhaps the schema has changed. Try reloading the map in the BizTalk Mapper.”

Leave a Reply

Your email address will not be published. Required fields are marked *

turbo360

Back to Top