2013-04-04 112 views
1

我通过.NET中使用7次(7.5 MQ客户amqmdnet.dll),并使用MQPutMessageOptionsMQGetMessageOptions,该代码工作正常与MQ 7.5 IBM客户端,但是问题IBM MQ客户端连接到一个较低的版本

IBM link

说7x mq客户端将向下兼容6x,当我尝试连接,我得到这个错误(在Windows 7 64位操作系统)。

System.TypeInitializationException: The type initializer for 'IBM.WMQ.MQQueueManager' threw an exception. ---> System.TypeInitializationException: The type initializer for 'IBM.WMQ.CommonServices' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object. 
    at IBM.WMQ.CommonServices..cctor() 
    --- End of inner exception stack trace --- 
    at IBM.WMQ.CommonServices.TraceEnabled() 
    at IBM.WMQ.MQBase..ctor() 
    at IBM.WMQ.Nmqi.NmqiEnvironment..ctor(NmqiPropertyHandler nmqiPropertyHandler) 
    at IBM.WMQ.Nmqi.NmqiFactory.GetInstance(NmqiPropertyHandler properties) 
    at IBM.WMQ.MQQueueManager..cctor() 

抛出上述错误的行是:

MQQueueManager mqQMgr = new MQQueueManager("My queue manager" , "my channel name" ,"my connection name"); 

PS:具有相同PARAMS上述行工作在7.5 MQ客户端细,但未能当6×(用于例如:6.0。安装2.5 MQ客户端,我已经做了“典型”安装(完全安装6X MQ客户端)。

不知道如何使它与工作6.0.2.5?

回答

5

是,该链接是正确的。什么链接是说您是否安装了MQ v7.5客户端,您将能够使用在远程机器上运行的MQ v6.0队列管理器。但你所尝试的似乎有所不同。您似乎已使用MQ v7.5客户端编译应用程序,但试图在MQ v6.0.x客户端上运行它。这不起作用。

+0

非常好,我希望我可以多次点击此答案! – Sharpeye500 2013-04-04 17:26:02

+0

好抓,沙市! – 2013-04-07 14:09:05