|
Home > Archive > MS SQL Server OLAP > March 2006 > ADOMD.NET 8.0: QueryInterface for IXMLA failed
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
ADOMD.NET 8.0: QueryInterface for IXMLA failed
|
|
| Ihor Bobak 2006-03-29, 11:30 am |
| I am using ADOMD.NET 8.0 with AS2000. I'm trying to do ExecuteXmlReader() and
I get the following exception (see below). When doing the same thing with
AS2005 - everything is fine.
I've tried to reproduce it on a clear workstation with Win2K SP4, .NET 1.1
and ADOMD.NET - the problem IS reproducible.
Can anyone tell me how to solve it?
[TYPE]: System. InvalidCastException
[MESSAGE]: QueryInterface for interface
Microsoft.AnalysisServices.AdomdClient.IXASC failed.
[STACK TRACE]:
at
Microsoft.AnalysisServices.AdomdClient.XASC.Microsoft.AnalysisServices.AdomdClient.IXASC. ProcessRequest(Objec
t RequestStream)
at
Microsoft.AnalysisServices.AdomdClient.StreamInteropHelper.ProcessRequest(XASC comClass, Stream requestStream)
at Microsoft.AnalysisServices.AdomdClient.IXMLAStream.WriteEndOfMessage()
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.EndRequest()
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.SendMessage(Boolean
endReceivalIfExcepti
on, Boolean readSession, Boolean
readNamespaceCompati
bility)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.SendMessage(Boolean
endReceivalIfExcepti
on)
at Microsoft.AnalysisServices.AdomdClient.XmlaClient.SendMessage()
at
Microsoft.AnalysisServices.AdomdClient.XmlaClient. ExecuteStatement(Str
ing
statement, IDictionary connectionProperties
, IDictionary commandProperties,
IDataParameterCollec
tion parameters, Boolean isMdx)
at
Microsoft.AnalysisServices.AdomdClient.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.IExecuteProvider. Execute(ICommandCont
entProvider
contentProvider, AdomdPropertyCollect
ion commandProperties,
IDataParameterCollec
tion parameters)
at Microsoft.AnalysisServices.AdomdClient.AdomdCommand.ExecuteXmlReader()
at
OlapFramework.Olap.DataPortal. OlapDataPortalExecut
erLocal. MDXRun(AdomdConnecti
on
aConnection, String aMDX) in
d:\projects\framewor
k\projects\olapframe
work\olap\dataportal
\olapdataportalexecu
terlocal.cs:line 211
| |
| Akshai Mirchandani [MS] 2006-03-29, 8:27 pm |
| Have you installed MSXML4?
Thanks,
Akshai
--
This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"Ihor Bobak" < IhorBobak@discussion
s.microsoft.com> wrote in message
news:DA301AFA-1BC9-420F-8FF1- 4713FEA1DBF6@microso
ft.com...
>I am using ADOMD.NET 8.0 with AS2000. I'm trying to do ExecuteXmlReader()
>and
> I get the following exception (see below). When doing the same thing with
> AS2005 - everything is fine.
>
> I've tried to reproduce it on a clear workstation with Win2K SP4, .NET 1.1
> and ADOMD.NET - the problem IS reproducible.
>
> Can anyone tell me how to solve it?
>
> [TYPE]: System. InvalidCastException
> [MESSAGE]: QueryInterface for interface
> Microsoft.AnalysisServices.AdomdClient.IXASC failed.
> [STACK TRACE]:
> at
> Microsoft.AnalysisServices.AdomdClient.XASC.Microsoft.AnalysisServices.AdomdClient.IXASC. ProcessRequest(Objec
t
> RequestStream)
>
> at
> Microsoft.AnalysisServices.AdomdClient.StreamInteropHelper.ProcessRequest(XASC
> comClass, Stream requestStream)
>
> at
> Microsoft.AnalysisServices.AdomdClient.IXMLAStream.WriteEndOfMessage()
>
> at Microsoft.AnalysisServices.AdomdClient.XmlaClient.EndRequest()
>
> at Microsoft.AnalysisServices.AdomdClient.XmlaClient.SendMessage(Boolean
> endReceivalIfExcepti
on, Boolean readSession, Boolean
> readNamespaceCompati
bility)
>
> at Microsoft.AnalysisServices.AdomdClient.XmlaClient.SendMessage(Boolean
> endReceivalIfExcepti
on)
>
> at Microsoft.AnalysisServices.AdomdClient.XmlaClient.SendMessage()
>
> at
> Microsoft.AnalysisServices.AdomdClient.XmlaClient. ExecuteStatement(Str
ing
> statement, IDictionary connectionProperties
, IDictionary
> commandProperties,
> IDataParameterCollec
tion parameters, Boolean isMdx)
>
> at
> Microsoft.AnalysisServices.AdomdClient.XmlaClientProvider.Microsoft.AnalysisServices.AdomdClient.IExecuteProvider. Execute(ICommandCont
entProvider
> contentProvider, AdomdPropertyCollect
ion commandProperties,
> IDataParameterCollec
tion parameters)
>
> at
> Microsoft.AnalysisServices.AdomdClient.AdomdCommand.ExecuteXmlReader()
>
> at
> OlapFramework.Olap.DataPortal. OlapDataPortalExecut
erLocal. MDXRun(AdomdConnecti
on
> aConnection, String aMDX) in
> d:\projects\framewor
k\projects\olapframe
work\olap\dataportal
\olapdataportalexecu
terlocal.cs:line
> 211
>
>
| |
| Ihor Bobak 2006-03-29, 8:27 pm |
| > Have you installed MSXML4?
Yes, I did. I got it from here:
http://www.microsoft.com/downloads/...&displaylang=en
But it did not solve the problem. I would like to describe what I've already
done so far and what I already know.
I've disassembled ADOMD.NET 8.0 into C# using Reflector and made it working,
so I can clearly see what class and what method raises the exception. NOTE:
this exception has place BOTH with using original and disassembled version,
so please, do not think that the problem occurs due to disassembly.
ADOMD.NET 8.0 has a class StreamInteropHelper with method ProcessRequest().
Inside this method there is a call
return new NativeIStream((UCOMI
Stream) ((IXASC) comClass).ProcessRequest(new
ManagedIStream(reque
stStream)));
it crashes with "cannot QueryInterface". Interface IXASC has GUID
08549D4C-E2F3-4631-8D63-E7A048F43E4C which is ABSENT in the registry (I
checked this on several PCs). Crash occurs when ((IXASC)
comClass).ProcessRequest is called. At this moment Registry Monitor (by Mark
Russinovich) shows that there is an operation
" OpenKey HKCU\Interfa
ce\{08549D4C-E2F3-4631-8D63-E7A048F43E4C}" with result
"KEY NOT FOUND".
Unfortunately, this problem is not 100% reproducible. The line ((IXASC)
comClass).ProcessRequest(...) sometimes works fine WITHOUT looking to that
registry key. Approximately in 80% of runs I get this crash.
A very strange fact is the following: the crash occurs only in my Windows
Forms (big) application; if I create a test console application that does the
same ExecuteXmlReader(), there are no crash. I know this is something that is
related to COM, but what to do next to solve the problem - no idea.
I verified it on Windows 2000 and Windows XP - the result is the same. I am
in despair - working at this problem already for the second day and without
result. Here http://sql.ru/forum/actualthread.aspx?tid=277077 I've posted (in
Russian) the same problem, hoping that either Mosha or Irina will see it and
respond, but there are still no answer.
Dear Akshai, I'll be very grateful for your help. My e-mail is ibobak [at]
gmail [dot] com, the same is MSN ID. This information is just for the case if
it will be more convenient for you to contact in this way.
| |
| Akshai Mirchandani [MS] 2006-03-29, 8:27 pm |
| Unfortunately off the top of my head I don't have any idea what could be
happening here. I haven't seen this issue before...
Thanks,
Akshai
--
--
This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"Ihor Bobak" < IhorBobak@discussion
s.microsoft.com> wrote in message
news:AB295788-ED1F-4C9B-A4AD- 7C702FFA10AF@microso
ft.com...
>
> Yes, I did. I got it from here:
> http://www.microsoft.com/downloads/...&displaylang=en
>
> But it did not solve the problem. I would like to describe what I've
> already
> done so far and what I already know.
>
> I've disassembled ADOMD.NET 8.0 into C# using Reflector and made it
> working,
> so I can clearly see what class and what method raises the exception.
> NOTE:
> this exception has place BOTH with using original and disassembled
> version,
> so please, do not think that the problem occurs due to disassembly.
>
> ADOMD.NET 8.0 has a class StreamInteropHelper with method
> ProcessRequest().
> Inside this method there is a call
>
> return new NativeIStream((UCOMI
Stream) ((IXASC)
> comClass).ProcessRequest(new
> ManagedIStream(reque
stStream)));
>
> it crashes with "cannot QueryInterface". Interface IXASC has GUID
> 08549D4C-E2F3-4631-8D63-E7A048F43E4C which is ABSENT in the registry (I
> checked this on several PCs). Crash occurs when ((IXASC)
> comClass).ProcessRequest is called. At this moment Registry Monitor (by
> Mark
> Russinovich) shows that there is an operation
> "OpenKey HKCU\Interface\{08549D4C-E2F3-4631-8D63-E7A048F43E4C}" with
> result
> "KEY NOT FOUND".
>
> Unfortunately, this problem is not 100% reproducible. The line ((IXASC)
> comClass).ProcessRequest(...) sometimes works fine WITHOUT looking to that
> registry key. Approximately in 80% of runs I get this crash.
>
> A very strange fact is the following: the crash occurs only in my Windows
> Forms (big) application; if I create a test console application that does
> the
> same ExecuteXmlReader(), there are no crash. I know this is something that
> is
> related to COM, but what to do next to solve the problem - no idea.
>
> I verified it on Windows 2000 and Windows XP - the result is the same. I
> am
> in despair - working at this problem already for the second day and
> without
> result. Here http://sql.ru/forum/actualthread.aspx?tid=277077 I've posted
> (in
> Russian) the same problem, hoping that either Mosha or Irina will see it
> and
> respond, but there are still no answer.
>
> Dear Akshai, I'll be very grateful for your help. My e-mail is ibobak [at]
> gmail [dot] com, the same is MSN ID. This information is just for the case
> if
> it will be more convenient for you to contact in this way.
| |
| Ihor Bobak 2006-03-29, 8:27 pm |
| > Unfortunately off the top of my head I don't have any idea what could be
> happening here. I haven't seen this issue before...
I tried to do next:
1) added a static reference to disassembled ADOMD.NET to the COM dll
"C:\Program
Files\Microsoft.NET\Adomd.NET\80\Microsoft.AnalysisServices.AdomdClient.dll"
2) removed files XASC.cs and IXASC.cs from the project
3) added a key to OlapFramework.dll (because it did not want to compile
after interop reference was added).
It did not give any result - the problem was the same. It could not make a
call to IXASC.ProcessRequest(), and during this call it tried to open
HKCR\Interface\{08549D4C-E2F3-4631-8D63-E7A048F43E4C} and same key under HKCU.
I am not a good specialist in COM, but as far as I know, the key
HKCR\Interface\{08549D4C-E2F3-4631-8D63-E7A048F43E4C} must exist just because
this is an interface. However, I verified on many PCs that after ADOMD.NET
8.0 installation it is simply absent. Why?
Can anyone reading this message look in the registry for the key
HKCR\Interface\{08549D4C-E2F3-4631-8D63-E7A048F43E4C}, and if you find it -
post here its contents? I'll be very grateful.
| |
| Ihor Bobak 2006-03-29, 8:27 pm |
| > 1) added a static reference to disassembled ADOMD.NET to the COM dll
> "C:\Program
> Files\Microsoft.NET\Adomd.NET\80\Microsoft.AnalysisServices.AdomdClient.dll"
I am terribly sorry - typing mistake. I meant "C:\Program
Files\Microsoft.NET\Adomd.NET\80\msadomdx.dll"
| |
| ibobak@gmail.com 2006-03-30, 1:30 pm |
| Problem is solved. It was MTA+COM issue.
|
|
|
|
|