Tuesday, March 27, 2012

Error processing events

Let me start by saying this is my first crack at NotificationServices. I installed a sample from "Microsoft SQL Server 2000 Notification Services" that processes stock events (I think it may be a copy of the one in the help file). I get the following error when I place a file in the EventsWatchDirectory. I have uninstalled and reinstalled SQLXML and MSXML3 (I already had MSXML4 sp2). Any help is appreciated.

<NotificationServicesEvent>

<Description>

The FileSystemWatcher event provider failed to submit events.

</Description>

<Context>

<EventParameters>

<ProviderName>StockEventProvider</ProviderName>

<EventFileName>C:\SQL-NS\Chapter03\Stock\EventsWatchDirectory\EventData.xml</EventFileName>

<EventClassName>StockPriceChange</EventClassName>

</EventParameters>

</Context>

<Description>

Unable to cast COM object of type 'SqlXmlBulkLoad.SQLXMLBulkLoadClass' to interface type 'SqlXmlBulkLoad.ISQLXMLBulkLoad'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{1380DD8D-DCB9-4A6E-9D53-EECDDF18DA85}' failed with HRESULT: 0x80004002 (No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))).

</Description>

<Instance>Chapter03</Instance>

<ApplicationName>Stock</ApplicationName>

<Component>Event collection</Component>

<Thread>15</Thread>

</NotificationServicesEvent>

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

Also of note:

I can instantiate SQLXMLBulkLoad.SQLXMLBulkLoad but not SQLXMLBulkLoad.SQLXMLBulkLoadClass. The first sample VB Script from the SQLXML works fine to insert data into a table.|||Answer was in the old forums. I had .Net 2.0 Beta 2 installed. Uninstalled it and repaired XML4.0 and SQLXML3.0 and all was good. Thanks Shyam|||Larry,
What version of the .NET frameworks do you have on the machine. Notification Services in SQL 2000 requires the .NET Framework 1.1. If you have version 2.0 (only - without a side-by-side copy of version 1.1), you will see this problem. The reason is that one of the methods we call when loading the XML event loading components has been made obsolete in the 2.0 .NET Frameworks.

If you want to go with the .NET Frameworks 2.0, you should use the version of Notification SErvices in SQL Server 2005 - that version is designed to work on .NET 2.0.

THanks
-shyam
Learn more about SQL-NS:
http://www.amazon.com/exec/obidos/tg/detail/-/0672326647/

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.|||

Hello Shyam,

I have the exact same problem (I am also using your book code samples) the SQL-NS applications are compiling OK, and the service starts nicely, but when I try to trigger an event, I get the following error:

Unable to cast COM object of type 'SqlXmlBulkLoad.SQLXMLBulkLoadClass' to interface type 'SqlXmlBulkLoad.ISQLXMLBulkLoad'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{1380DD8D-DCB9-4A6E-9D53-EECDDF18DA85}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

the configuration of my development machine is the following:

Windows XP Pro SP2

SQL Server 2000 SP4

SQL Server 2000 Notification Services SP1

SQLXML 3.0 SP3

.NET Framework 1.1 (VS 2003)

.NET Framework 2.0 (VS 2005)

SQL Server 2005 Express (the edition that is installed with VS 2005)

Unfortunately I am developping with both versions of visual studio (2003 & 2005) so I need both frameworks.

We are using SQL server 2000 and are not ready to upgrade to SQL server 2005.

Is there any fix I could use?

Thanks for your help.

Henri PIQUET

No comments:

Post a Comment