Is there a bug in BizTalk 2006 R2 SP1?

Update 2012-03-28
This bug was fixed in the CU2 update for BizTalk 2006 R2 SP 1. Further details can be found here and here.

Update 2010-04-12
Seems like there is a patch coming that should fix all the bugs in SP1 … I’ve been told it should be public within a week or two. I’ll make sure to update the post as I know more. Our problem is still unsolved.

Late Thursday night last week we decided to upgrade one of our largest BizTalk 2006 R2 environment to recently released Service Pack 1. The installation went fine and everything looked good.

… But after a while we started see loads of error messages looking like below.

Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘Microsoft.BizTalk.PipelineOM.IInterceptor’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{24394515-91A3-4CF7-96A6-0891C6FB1360}’ failed due to the following error: Interface not registered (Exception from HRESULT: 0×80040155).

After lots of investigation we found out that we got the errors on ports with the follow criteria:

Reproduce it to prove it!

I’ve setup a really simple sample solution to reproduce the problem. Download it here.

The sample receives a XML file, maps it on the send port to schema made to match the store procedure. It also uses a dead simple tracking definition and profile to track a milestone on the send port.image

Sample solution installation instructions

  1. Create a database called “Test”

  2. Run the two SQL scripts (“TBL_CreateIds.sql” and “SP_CreateAddID.sql”) in the solution to create the necessary table and store procedure

  3. Deploy the BizTalk solution just using simple deploy from Visual Studio

  4. Apply the binding file (“Binding.xml”) found in the solution

  5. Run the BM.exe tool to deploy the BAM tracking defintion.
    Should look something like:

    bm.exe deploy-all -definitionfile:<the path to the solution>\BAM\SimpleTestTrackingDefinition.xml

  6. Start the tracking Profile editor and open the “SimpleTestTrackingProfile.btt“ that you’ll find in the solution and apply the profile

  7. Drop the test file in the receive folder (“InSchema_output.xml”)

The sample solution fails on a environment with SP 1 but works just fine on a “clean” BizTalk 2006 R2 environment.

What about you?

I haven’t had time to test this on a BizTalk 2009 environment but I’ll update the post as soon as I get around to it.

We also currently have a support case with Microsoft on this and I’ll make sure to let you as soon as something comes out of that. But until then I’d be really grateful to hear from you if any of you have the same behavior in your BizTalk 2006 R2 SP1 environment.

There's 9 Comments So Far

  • patrick wellink
    March 17th, 2010 at 4:32 pm

    I am facing the same kind of error messages lately and i am still on the original release.

    This is a copy of my eventlog message :

    Event Type: Error
    Event Source: XLANG/s
    Event Category: None
    Event ID: 10034
    Date: 17-3-2010
    Time: 14:42:42
    User: N/A
    Computer: BA34T
    Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘FH.CCE.FFS.RIS.SQL_FFS_DB_v0103.utg_die_tra_v0103_Service(591456eb-c42e-dacc-6d9b-b783c6ec8e98)’.
    The service instance will remain suspended until administratively resumed or terminated.
    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
    InstanceId: d13833b3-070c-40f1-8925-90a5f29b7c85
    Shape name: New Or Resubmit
    ShapeId: cc0fb73e-75e7-4443-879f-e6c0d5bce6ea
    Exception thrown from: segment 1, progress 3
    Inner exception: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘Microsoft.BizTalk.Agent.Interop.IBTMessageSpaceEx’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{6C90EC05-4918-11D3-A242-00C04F60A533}’ failed due to the following error: No such interface supported (Exception from HRESULT: 0×80004002 (E_NOINTERFACE)).

    Exception type: InvalidCastException
    Source: Microsoft.BizTalk.Interop.Agent
    Target Site: Microsoft.BizTalk.Agent.Interop.IBTMessageBatch GetMessageBatch(System.Guid ByRef)
    The following is a stack trace that identifies the location where the exception occured

    at Microsoft.BizTalk.Agent.Interop.IBTMessageSpaceEx.GetMessageBatch(Guid& batchID)
    at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.GetBatch(Guid& batchId)
    at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.get_Batch()
    at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.get_Batch()
    at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.ReceiveComplete(Envelope env, Boolean final)
    at Microsoft.XLANGs.Core.Envelope.PrepareForReceive(XlangStore store)
    at Microsoft.XLANGs.Core.PerformPrepareForReceive.PrePersist(Boolean dehydrate, XlangStore store)
    at Microsoft.XLANGs.Core.Service.AddTransactedWork(Transacted t, XlangStore store)
    at Microsoft.XLANGs.Core.ServiceContext.AddTransactedWork(Transacted t, XlangStore store)
    at Microsoft.XLANGs.Core.LongRunningTransaction.AddTransactedWork(Transacted t, XlangStore store)
    at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.ReceiveMessage(Int32 iOperation, Envelope env, XLANGMessage msg, Correlation[] initCorrelations, Context cxt, Segment s)
    at FH.CCE.FFS.RIS.SQL_FFS_DB_v0103.utg_die_tra_v0103_Service.segment1(StopConditions stopOn)
    at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    I have never seen these kind of messages before….
    The shape New Or Resubmit is a listen that listens for a new message or a resubmitted message.

    The orch is running fine for all the time but sometimes I suddenly get this error. The receiveport is finished, The orch is active but never really starts……

    Looks a bit the same !

  • patrick wellink
    March 18th, 2010 at 7:51 am

    Additional information…..

    Just before I start my orchestration, I write some audit to BAM…. This is done in a pipeline component that writes some audit message. This is not done via a tracking profile but directly.

  • patrick wellink
    March 22nd, 2010 at 6:11 pm

    For now i know for sure there is a bug in BizTalk SP1 even without using BAM….
    But if you read the comments here : http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/9ac081cd-0d14-4a8d-b679-c54b62d47964

    You will see there is an issue with BAM as wel…… ( Click on the name of the comment from BAMS) -> http://social.msdn.microsoft.com/Profile/en-US/?user=Bams&referrer=http%3a%2f%2fsocial.msdn.microsoft.com%2fForums%2fen-US%2fbiztalkgeneral%2fthread%2f9ac081cd-0d14-4a8d-b679-c54b62d47964&rh=yBN%2fFZVDPgOKu%2fK4Ux3CP9zbe2U8Zq8T%2bYlbvdI4SKw%3d&sp=forums

    And have a read of what he is encountering with SP1

  • Richard
    March 23rd, 2010 at 6:13 am

    @patric Thanks for your post in this matter! Nice to not be alone! ;)

    Too bad it’s almost impossible rolling back to “pre-SP1″ …

    We’re now in a situation were we had to turn all over BAM tracking off and not a work from MS and the support case in days. I’ll let you know as soon as we know more.

    Here’s another one having SP1 related problems: http://fehlberg.wordpress.com/2010/03/10/sp1-and-the-oracle-adapter-in-biztalk-adapter-pack-2-0/

  • patrick wellink
    March 24th, 2010 at 12:33 pm

    Hmmm I am beginning to see a relation with BAM here………

  • patrick wellink
    March 24th, 2010 at 12:43 pm

    Also see my thread on MSDN : http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/d4469b38-bc7f-45b0-a6bd-5d3b85990697

    The funny thing this error (eventually boiling down to the dreaded com error (Unable to cast COM object of type ‘System.__ComObject’ )) occurs now on an orchestration that has been deployed for over a year now.

    This happens on a BT SP1 machine and a machine without SP1, it really looks like some MS – Update released before 17 march 2010 caused this problem to appear. Could be several items together that broke BizTalk -> Com I really don’t know what’s happening anymore.

    But I do know i have never seen so many of these (Unable to cast COM object of type ‘System.__ComObject’ ) in relation to BizTalk as I am seeing now. Please keep me informed about your progress

  • patrick wellink
    March 24th, 2010 at 12:44 pm

    I just realise this post is from 17 March and my first error in the evenlog is also from march 17 !!!

    This cannot be a coincidence !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

  • Stefan
    March 3rd, 2011 at 12:46 am

    Sorry to bump a year-old post… but I was curious if there really was a bug and if you got it fixed? (i.e. are ”support contracts” worth its salt? :-)

  • Niklas
    February 13th, 2012 at 11:58 pm

    This Unable to cast COM object fix was released back in june 2010 as part of BizTalk 2006 R2 SP1 CU2:
    Perhaps top update section can be updated to include that.

Share your thoughts, leave a comment!