You receive a "QueryInterface for interface Microsoft.BizTalk.KwTpm.StsBizTalkAdapter.IStsAdapter failed" error message in BizTalk Server 2004 (888754)



The information in this article applies to:

  • Microsoft BizTalk Server 2004 Enterprise Edition
  • Microsoft BizTalk Server 2004 Developer Edition
  • Microsoft BizTalk Server 2004 Partner Edition
  • Microsoft BizTalk Server 2004 Standard Edition

SYMPTOMS

In Microsoft BizTalk Server 2004, any one of the following operations may be unsuccessful:
  • You try to send a message to the Inbox or Sent Items folder.
  • You try to send a message from the Outbox to BizTalk Server.
  • You try to register a BizTalk Server-based server.
An error message that is similar to the following is logged in the Application event log:
Event Type: Error
Event Source: KwTpm
Event Category: None
Event ID: 2203
Date: 1/21/2004
Time: 3:55:04 PM
User: N/A
Computer: ComputerName
Description:
QueryInterface for interface Microsoft.BizTalk.KwTpm.StsBizTalkAdapter.IStsAdapter failed.

The StsAdapterEventHandler has caught an unexpected exception. The exception details are logged below.

Exception type: "System.InvalidCastException".
Exception source: "mscorlib".
Exception message: "QueryInterface for interface Microsoft.BizTalk.KwTpm.StsBizTalkAdapter.IStsAdapter failed.". Stack trace: "
Server stack trace:

at Microsoft.BizTalk.KwTpm.StsBizTalkAdapter.IStsAdapter.SendMessageToBizTalk(String docLibTitle, String documentFullUrl, String officeDocFilePath, String& statusValue, String& descriptionValue)

at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)

at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

at Microsoft.BizTalk.KwTpm.StsBizTalkAdapter.StsAdapter.SendMessageToBizTalk(String docLibTitle, String documentFullUrl, String officeDocFilePath, String& statusValue, String& descriptionValue

at Microsoft.BizTalk.KwTpm.StsAdapterEventHandler.StsAdapterEventHandler.Microsoft.SharePoint.IListEventSink.OnEvent(SPListEvent listEvent)".

If present, next exception is the inner exception.

For more information, see Help and Support Center at http://support.microsoft.com.

CAUSE

This problem occurs if the registry information for the StsAdapter component is corrupted. The corruption occurs during an Upgrade operation to BizTalk Server 2004. The corruption can also occur during the Repair operation for BizTalk Server 2004 if the Microsoft.BizTalk.KwTpm.StsBizTalkAdapter.dll file is missing before the Repair operation starts.

RESOLUTION

To resolve this problem, use one of the following methods.

Method 1: Use Administrative Tools

  1. Click Start, point to Administrative Tools, and then click Component Services.
  2. In the Component Services dialog box, expand Computers, expand My Computer, expand COM+ Applications, expand BizTalk.KwTpm.StsBizTalkAdapter.StsBizTalkAdapterService, and then expand Components.
  3. Right-click Microsoft.BizTalk.KwTpm.StsBizTalkAdapter.StsAdapter, and then click Delete. Click Yes to confirm the deletion.
  4. Right-click Components, point to New, and then click Component.
  5. In the COM+ Component Install Wizard, click Next, and then click Install new component(s).
  6. In the Select files to install dialog box, locate the Drive:\Program Files\Microsoft BizTalk Server 2004\Business Activity Services\KwSts\Shared folder, and then click Microsoft.BizTalk.KwTpm.StsBizTalkAdapter. Microsoft.BizTalk.KwTpm.StsBizTalkAdapter.StsAdapter appears under Components found.
  7. Click Next, and then click Finish.
  8. Click Start, point to Administrative Tools, and then click Services.
  9. Right-click BizTalk SharePoint Messaging Adapter, and then click Restart.

Method 2: Use the Visual Studio .NET Command Prompt

  1. Click Start, click All Programs, and then click Microsoft Visual Studio .NET 2003.
  2. Click Visual Studio .NET Tools, and then click Visual Studio .NET 2003 Command Prompt.
  3. In the Visual Studio .NET 2003 Command Prompt, type the following command, and then press ENTER:

    regsvcs /fc /componly "drive:\Program Files\Microsoft BizTalk Server 2004\Business Activity Services\KwSts\Shared\Microsoft.BizTalk.KwTpm.StsBizTalkAdapter.dll"

  4. Stop and then start the BizTalk SharePoint Messaging Adapter service. To do this, follow these steps:
    1. Click Start, point to Administrative Tools, and then click Services.
    2. Right-click BizTalk SharePoint Messaging Adapter, and then click Stop.
    3. Right-click BizTalk SharePoint Messaging Adapter, and then click Start.
Note You may also have to stop and then start the IIS Admin Service.

Modification Type:MajorLast Reviewed:9/22/2006
Keywords:kbtshoot kbsetup kbprb KB888754 kbAudDeveloper kbAudITPRO