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 » Exception starting C# WMQ connection (NmqiPropertyHandler?)

Post new topic  Reply to topic
 Exception starting C# WMQ connection (NmqiPropertyHandler?) « View previous topic :: View next topic » 
Author Message
mcoyote
PostPosted: Tue Oct 27, 2009 11:04 am    Post subject: Exception starting C# WMQ connection (NmqiPropertyHandler?) Reply with quote

Newbie

Joined: 27 Oct 2009
Posts: 8

Hi there,

Similar to another, recent post (can't post links yet, sorry), I'm getting the following stack trace when attempting to connect to a remote WMQ server:

System.TypeInitializationException: The type initializer for 'IBM.XMS.Client.WMQ.WmqConnectionFactory' threw an exception. ---> System.TypeLoadException: Could not load type 'IBM.WMQ.Nmqi.NmqiPropertyHandler' from assembly 'amqmdnet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=dd3cb1c9aae9ec97'.
at IBM.XMS.Client.WMQ.WmqConnectionFactory..cctor()
--- End of inner exception stack trace ---
at IBM.XMS.Client.WMQ.WmqConnectionFactory..ctor(XmsPropertyContext props)
at IBM.XMS.Client.WMQ.WmqFactoryFactory.CreateProviderConnectionFactory(XmsPropertyContext properties)
at IBM.XMS.Client.Impl.XmsConnectionFactoryImpl.SetProviderFactory()
at IBM.XMS.Admin.Objects.MQConnectionFactory..ctor()
at IBM.XMS.Admin.Objects.WmqXmsFactory.CreateConnectionFactory()
at IBM.XMS.Client.Impl.XmsFactoryFactoryImpl.CreateConnectionFactory()
at com.tideworks.intertask.xms.XMSDataConnection.PreProcessData(Boolean isSignal)

The specifics are, as follows:

- WMQ server install, v7, on another machine. We've set up queues, etc. on this server and can already interact with it successfully using similarly-configured C++ and Java-based clients.
- IBM WebSphere MQ client, Version 6.0.2.x (we can't find a newer version)
- IBM Message Service Client for .NET, v2.0 (the "ia9h" package)

Initially, we didn't have the message service client for .NET installed and the client couldn't obtain the implementation assemblies at runtime, but since installing that we're receiving this error. This leads us to believe we have all the needed IBM-sourced products, but then there's this error.

The sample executables do exactly the same thing (all inputs enclosed in <> are substituted for this post):

C:\Program Files\IBM\Message Service Client for .NET\tools\dotnet\samples\bin>Sa
mpleProducerCS.exe

Enter '?' for help with any question.

Desired mode to run this sample application [simple]: advanced
Enter administered object directory (optional):
Enter connection type [wpm]: help
- Incorrect value for this option.
- Valid values are: wpm, wmq, or rtt.
- Default value is: wpm.

Enter connection type [wpm]: wmq
Enter connection mode [client]: client
Enter queue manager (optional):
Enter hostname [localhost]: <host>
Enter port [1414]:
Enter channel [SYSTEM.DEF.SVRCONN]:
Enter destination URI [queue:///SYSTEM.DEFAULT.LOCAL.QUEUE]: queue:///<queue>

Enter user (optional): <username>
Enter password (optional): <password>
Enter delivery mode [non-persistent]:
Enter message type [text]:
Your message (optional): woof
Enter number of messages [infinite]: 10
Enter interval between messages in seconds [1]:
Exception caught: System.TypeInitializationException: The type initializer for '
IBM.XMS.Client.WMQ.WmqConnectionFactory' threw an exception. ---> System.TypeLoa
dException: Could not load type 'IBM.WMQ.Nmqi.NmqiPropertyHandler' from assembly
'amqmdnet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=dd3cb1c9aae9ec97'.
at IBM.XMS.Client.WMQ.WmqConnectionFactory..cctor()
--- End of inner exception stack trace ---
at IBM.XMS.Client.WMQ.WmqConnectionFactory..ctor(XmsPropertyContext props)
at IBM.XMS.Client.WMQ.WmqFactoryFactory.CreateProviderConnectionFactory(XmsPr
opertyContext properties)
at IBM.XMS.Client.Impl.XmsConnectionFactoryImpl.SetProviderFactory()
at IBM.XMS.Admin.Objects.MQConnectionFactory..ctor()
at IBM.XMS.Admin.Objects.WmqXmsFactory.CreateConnectionFactory()
at IBM.XMS.Client.Impl.XmsFactoryFactoryImpl.CreateConnectionFactory()
at IBM.XMS.Samples.XMSApp.MyCreateConnectionFactoryWMQ()
at IBM.XMS.Samples.XMSApp.MyCreateConnectionFactory()
at IBM.XMS.Samples.SampleProducer.SendMessages()
at IBM.XMS.Samples.SampleProducer.Main(String[] args)
Sample execution FAILED!
Press return key to continue...

...What could we be missing? As mentioned, our C++/Java clients are banging along fine, and the structure of their code looks almost exactly the same as the C# found in both the sample and our purpose-built clients.
Back to top
View user's profile Send private message
mcoyote
PostPosted: Wed Oct 28, 2009 2:41 pm    Post subject: Reply with quote

Newbie

Joined: 27 Oct 2009
Posts: 8

Hi there,

I've since investigated this further and it's gotten murkier. When poking around with Reflector in the assemblies installed by the IBM Message Service for .NET (as found in the GAC, post-install):

(a) XMSFactoryFactory attempts to construct a WmqConnectionFactory
(b) The ctor for WmqConnectionFactory (from the IBM.XMS.Client.WMQ package) attempts to create a WmqPropertyHandler which derives from the type referred to in the exception (NmqiPropertyHandler, from the IBM.WMQ.Nmqi package)
(c) This type isn't in any of the assemblies provided in the IBM Message Service for .NET so can't be instantiated when using the standard factory methods

This is why our code and the sample binaries refuse to execute in WMQ mode. I have trouble believing this is the issue, but it surely seems that way. Does this jibe with the experience of others?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Oct 28, 2009 6:02 pm    Post subject: Reply with quote

Grand High Poobah

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

Have you installed you XMS package on top of a full MQClient?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mcoyote
PostPosted: Wed Oct 28, 2009 6:55 pm    Post subject: Reply with quote

Newbie

Joined: 27 Oct 2009
Posts: 8

fjb_saper wrote:
Have you installed you XMS package on top of a full MQClient?


Let's sere...last we tried was v6.0.2.8, with server v7.0.1. That's what you meant by that, correct? We've been trying several versions on xp workstations and a server 200x vm.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Oct 29, 2009 3:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

I think the poster means "have you installed a full WMQ client or just copied some likely looking dlls?"
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mcoyote
PostPosted: Thu Oct 29, 2009 8:49 am    Post subject: Reply with quote

Newbie

Joined: 27 Oct 2009
Posts: 8

Vitor wrote:
I think the poster means "have you installed a full WMQ client or just copied some likely looking dlls?"


Yes, I ran the official IBM installers for all three products, every time we tried a new permutation.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 29, 2009 9:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Running the installer does not necessarily mean that you have installed the WMQ Client itself.

If you have run the typical configuration from WMQ Server installer CD, then it will not also install WMQ Client component.
Back to top
View user's profile Send private message
mcoyote
PostPosted: Thu Oct 29, 2009 9:37 am    Post subject: Reply with quote

Newbie

Joined: 27 Oct 2009
Posts: 8

mqjeff wrote:
Running the installer does not necessarily mean that you have installed the WMQ Client itself.

If you have run the typical configuration from WMQ Server installer CD, then it will not also install WMQ Client component.


Ok, to be clear as I suggested in the original post, about halfway down:

In all scenarios attempted so far --

* Installed server on machine (A) (v7.0.1)
* Installed client on machine (B) (v6.0.2.8)
* Installed message services for .NET on machine (B) (v2.0)

...This isn't the first time we've dealt with Websphere MQ at all. I did the C++ side of this solution about 8mos ago. And the sample applications are doing this, as well, right out of the box.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 29, 2009 9:51 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So, reading the thread again.

You probably need either the WMQ V7 client or a WMQ v6 version of IA9H.

At least one of those should be findable on the SupportPacs site.

In fact, reviewing the page for the current release of IA9H, it says
Quote:

NOTE 1: If using WebSphere MQ, the machine used to run the XMS application must be installed with the WebSphere MQ Client V7.0.1.0 or later (these libraries are pre-installed on machines with a local queue manager of an appropriate level). These support 'client' mode connections to V5.3,V6.0 and V7.0 queue managers or 'bindings' mode connection to a local queue manager of an appropriate level.


So you need to install the 7.0.1.0 client if you're using the release of IA9H dated 2009-04-30​

Oddly enough that page also links to the WMQ 6 client installs, but the link you want is http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24019253&loc=en_US&cs=utf-8&lang=en
Back to top
View user's profile Send private message
mcoyote
PostPosted: Thu Oct 29, 2009 9:55 am    Post subject: Reply with quote

Newbie

Joined: 27 Oct 2009
Posts: 8

mqjeff wrote:
So, reading the thread again.

You probably need either the WMQ V7 client or a WMQ v6 version of IA9H.

At least one of those should be findable on the SupportPacs site.

In fact, reviewing the page for the current release of IA9H, it says
Quote:

NOTE 1: If using WebSphere MQ, the machine used to run the XMS application must be installed with the WebSphere MQ Client V7.0.1.0 or later (these libraries are pre-installed on machines with a local queue manager of an appropriate level). These support 'client' mode connections to V5.3,V6.0 and V7.0 queue managers or 'bindings' mode connection to a local queue manager of an appropriate level.


So you need to install the 7.0.1.0 client if you're using the release of IA9H dated 2009-04-30​

Oddly enough that page also links to the WMQ 6 client installs, but the link you want is http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24019253&loc=en_US&cs=utf-8&lang=en


UGH...that may be it. The support pac for IA9H only pointed us at the WMQ 6 client installs, so we thought that's all there was. It occurred to us as odd to insist on "7" and only link to "6", but we figured the server/client installs must have discontinuous version numbers or something.

Checking .
Back to top
View user's profile Send private message
mcoyote
PostPosted: Fri Oct 30, 2009 12:39 pm    Post subject: Reply with quote

Newbie

Joined: 27 Oct 2009
Posts: 8

mcoyote wrote:
mqjeff wrote:
So, reading the thread again.

You probably need either the WMQ V7 client or a WMQ v6 version of IA9H.

At least one of those should be findable on the SupportPacs site.

In fact, reviewing the page for the current release of IA9H, it says
Quote:

NOTE 1: If using WebSphere MQ, the machine used to run the XMS application must be installed with the WebSphere MQ Client V7.0.1.0 or later (these libraries are pre-installed on machines with a local queue manager of an appropriate level). These support 'client' mode connections to V5.3,V6.0 and V7.0 queue managers or 'bindings' mode connection to a local queue manager of an appropriate level.


So you need to install the 7.0.1.0 client if you're using the release of IA9H dated 2009-04-30​

Oddly enough that page also links to the WMQ 6 client installs, but the link you want is http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24019253&loc=en_US&cs=utf-8&lang=en


UGH...that may be it. The support pac for IA9H only pointed us at the WMQ 6 client installs, so we thought that's all there was. It occurred to us as odd to insist on "7" and only link to "6", but we figured the server/client installs must have discontinuous version numbers or something.

Checking .


Uh huh. That was exactly the issue -- we weren't aware "7" clients even existed, thanks to the info on the .NET supportpac page, so had been installing what we were used to (6) all along. Once 7 is installed, life is good. It appears we don't have to install the .NET support pac on the target client machines either, just the 7-level clients (much as with the C++ supportpac).

Your input is much appreciated, thank you for being so thorough.
Back to top
View user's profile Send private message
shashikanth_in
PostPosted: Fri Nov 06, 2009 12:43 am    Post subject: Reply with quote

Centurion

Joined: 26 Feb 2009
Posts: 123

Yes, just clarify:
IA9H 2.0 pre-requistes WMQ 7.0.1.0 client. You are right, you don't need to separately install IA9H supportpack. It gets installed when you install WMQ v7.0.1.0 client.
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 » Exception starting C# WMQ connection (NmqiPropertyHandler?)
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.