While undeploying a BizTalk Applciation recently something went wrong, leaving BizTalk in a strange state.
When opening the BizTalk Server Administration Console the following message would be displayed:
Schema referenced by Map 'xxxxxxx' has been deleted. The local, cached version of the BizTalk Server group configuration is out of date. You must refresh the BizTalk Server group configuration before making further changes.
The problem with this was that any attempt to refresh the BizTalk group in the console failed.
I also tried such things as service and server restarts but nothing so simple worked.
Following various leads lead me to look at the bt_mapspec table in the BizTalkMgmtDb database. Here I saw that, although the application and all other artifacts of the application had been removed, there was still an entry for the map that the error was reporting on.
Deleting this entry allowed the group to be refreshed and the undeployment and deployment of updated applications have since been working without any problems.
DELETE FROM bt_mapspec WHERE itemid = xxx