ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » TypeInitializationException

Post new topic  Reply to topic
 TypeInitializationException « View previous topic :: View next topic » 
Author Message
sking500
PostPosted: Tue Mar 15, 2005 11:47 am    Post subject: TypeInitializationException Reply with quote

Newbie

Joined: 15 Mar 2005
Posts: 5

I am trying to access an remote queue on a remote WebSphere MQ server using the .NET classes. I have setup the latest eval of WSMQ on a Win2K3 standard server, and am using a web service application on a Win2K3 Web edition server to post messages to the WSMQ server. The server hosting the web service has the latest WSMQ (5.3) client installed. When the webservice attempts to create an instance of the MQMessageQueue class, I receive a "TypeInitializationException" with a message of "The type initializer for "IBM.WMQ.MQTrace" threw an exception." and a stack trace of "at IBM.WMQ.MQTrace.Entry(UInt32 component, UInt32 module) at IBM.WMQ.MQQueueManager.Connect(String queueManagerName) at IBM.WMQ.MQQueueManager..ctor()".

Just a few notes:
- I have tried setting the MQEnvironment.Hostname to both the server name and IP address.
- I have set the MQEnvironment.Channel to the default channel (i.e. S_{servername}).
- I do not specify a port number as the server is set to use the default port.
- I am using the default message queue manager name (i.e. QM_{servername}).

I also run this same basic configuration on my Win2K Pro development machine, and do not receive this error.

I have tried adding amqmdnet to the GAC, and making it a trusted assembly, but no success. Any assistance would be greatly appreciated.

Thank you!


Last edited by sking500 on Tue Mar 15, 2005 3:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
dpchiesa
PostPosted: Tue Mar 15, 2005 1:23 pm    Post subject: latest? Reply with quote

Apprentice

Joined: 29 May 2002
Posts: 46

when you say "Latest WSMQ (5.3) client", does that include the latest fixpack? Which I think is currently CSD 08 ?
_________________
-dpchiesa
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 15, 2005 3:10 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

sking500 wrote:
I am using the default message queue manager name (i.e. MQ_{servername}).

You have to be more careful and / or less dislexic.
The default qmgr name is QM_{servername}

That might well be your trouble. Check as well that you do indeed have a listener running on the default port.

Enjoy
Back to top
View user's profile Send private message Send e-mail
sking500
PostPosted: Tue Mar 15, 2005 3:31 pm    Post subject: Reply with quote

Newbie

Joined: 15 Mar 2005
Posts: 5

fjb_saper wrote:

You have to be more careful and / or less dislexic.
The default qmgr name is QM_{servername}


Gee Spidey, I thought this was a place one could go for help, not get snide remarks about obvious typos. Thanks for nothing. Oh and you may want to check your spelling of dyslexic.

fjb_saper wrote:

That might well be your trouble. Check as well that you do indeed have a listener running on the default port.


What part of "I also run this same basic configuration on my Win2K Pro development machine, and do not receive this error." did you miss? If there were no listener, I would receive this error on my development machine as well, right, "grand master".


Last edited by sking500 on Tue Mar 15, 2005 3:49 pm; edited 2 times in total
Back to top
View user's profile Send private message
sking500
PostPosted: Tue Mar 15, 2005 3:36 pm    Post subject: Re: latest? Reply with quote

Newbie

Joined: 15 Mar 2005
Posts: 5

dpchiesa wrote:
when you say "Latest WSMQ (5.3) client", does that include the latest fixpack? Which I think is currently CSD 08 ?


I'm using the 5.3 client downloaded from IBM a few days ago. I did not see any mention of which fixpacks it includes. I'll revisit their site, and see if it does include the fixpack.

Question is why would it behave differently between a Win2K Pro machine, and W2K3 Server (Web edition) machine? Both receive the same version of the client install with no mods.

Thank you!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 15, 2005 3:48 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Well the CSD is of importance as you get .net support only with CSD05 and above.

Sorry it was not meant as a snide remark. You'd be surprise how many times a typo prevented things from running right. We can't dream that what you sent is in fact a typo however obvious it looks.

Ok now as you seem to have this running somewhere else:

A) different machine different reality.
-- different authorization setup.

If the listener is not running under the correct user_id (must be part of mqm group) everything will look fine but you still won't be able to connect.

Enjoy
Back to top
View user's profile Send private message Send e-mail
sking500
PostPosted: Tue Mar 15, 2005 4:02 pm    Post subject: Reply with quote

Newbie

Joined: 15 Mar 2005
Posts: 5

According to my LAN admins, the web server is supposed to have rights to the server / manager / queue. I was told they set up the ASPNET user with rights. You just reminded me...I can try impersonating myself to confirm...thanks.

I apologize for jumping down your throat. So far my experiences with message queuing in general have not been all that hot. I simply want to get this issue resolved before upper management puts the kaibosh on this part of my project, and forces me to use some hacked solution instead.

Regarding CSD05, if I ran the same MQ client install on my desktop development machine (that is working) that I ran on the server (that is not), wouldn't it stand to reason that the install includes it?

While I concur that it may also be inherent differences between Win2K Pro, and Win2K3 Server, I was under the impression that the .NET framework was supposed to mask OS-specific quirks. Maybe not.

I also seem to remember that I ran into the rights issue with some of my initial tests, and that it returned a completely different error message. Impersonation should answer that question.

Thank you.
Back to top
View user's profile Send private message
sking500
PostPosted: Tue Mar 15, 2005 5:05 pm    Post subject: Reply with quote

Newbie

Joined: 15 Mar 2005
Posts: 5

Update:

My attempts to impersonate a user that I know for sure has sufficient rights to access the remote queue (me) also failed with the same error message. Back to the drawing board...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » TypeInitializationException
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.