A client called up today with a really odd error. the issue was on BizTalk 2006 and the HL7 accelerator. They had modified an orchestration and deployed their orchestration, but received the following error at the end of the orchestration:
Inner exception: The part 'MSHSegment' of message 'msgADT_A01_24_In' contained a null value at the end of the construct block.Exception type: NullPartExceptionSource: Microsoft.XLANGs.EngineTarget Site: Void CheckNonNull()The following is a stack trace that identifies the location where the exception occuredat Microsoft.XLANGs.Core.Part.CheckNonNull()at Microsoft.XLANGs.Core.Part.Persist(String& encoding, Boolean wantEncoding)at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.StagePartData(Part part)at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.PrepareMessage(XLANGMessage msg, IList promoteProps, IList toPromote)at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.WriteMessageState(XLANGMessage msg, Segment seg, IList promoteProps, Boolean track, IList toPromote, Boolean ignoreRoutingFailure)at Microsoft.BizTalk.XLANGs.BTXEngine.BTXDirectPortBinding.SendMessage(XLANGMessage xmsg, XlangStore store, Segment seg, OperationInfo op, IList additionalProps, IList toPromote, Boolean ignoreRoutingFailure)at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, Context cxt, Segment seg, ActivityFlags flags)Inner exception: The part 'MSHSegment' of message 'msgADT_A01_24_In' contained a null value at the end of the construct block. Exception type: NullPartExceptionSource: Microsoft.XLANGs.EngineTarget Site: Void CheckNonNull()The following is a stack trace that identifies the location where the exception occuredat Microsoft.XLANGs.Core.Part.CheckNonNull() at Microsoft.XLANGs.Core.Part.Persist(String& encoding, Boolean wantEncoding) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.StagePartData(Part part) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.PrepareMessage(XLANGMessage msg, IList promoteProps, IList toPromote) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.WriteMessageState(XLANGMessage msg, Segment seg, IList promoteProps, Boolean track, IList toPromote, Boolean ignoreRoutingFailure) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXDirectPortBinding.SendMessage(XLANGMessage xmsg, XlangStore store, Segment seg, OperationInfo op, IList additionalProps, IList toPromote, Boolean ignoreRoutingFailure) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, Context cxt, Segment seg, ActivityFlags flags)
This error was especially odd because the client had only made a simple change to a called map. We did some quick sanity checks and redeployed, but received the same error. This went on for a while until eventually we ended up recreating the orchestration (it was a simple one), but even that didn’t work.
The only remaining option that I had was to remove the back-end C# file for the orchestration. To view this file, either remove it from the file system or by turning on “Show all Files” in the Solution Explorer of Visual Studio.
I recompiled, deployed and everything was set. I cant say that I really have a great idea of why this happened. My best guess is that something was not synchronized in the back-end file.