I'm trying to use mo74 library but I always get exception "System.TypeInitializationException,WebSphereMQ.".
Library is installed (I can get help by WMQ commands).
The link from where I downloaded it - http://www-01.ibm.com/support/docview.wss?uid=swg24017698 Configuration:
Windows Server 2008R2
PSVersion 2.0
Broker Version 7.0.0.5
Also tried on Windows 7, PS 2.0, Broker 7.0.0.5, Windows Server 2012, PS 4.0, Broker 7.0.0.0 with same result.
After install I tried to add WebSphereMQ.dll to GAC
[Reflection.Assembly]::LoadWithPartialName("System.EnterpriseServices") | Out-Null
[System.EnterpriseServices.Internal.Publish] $publish = new-object System.EnterpriseServices.Internal.Publish
$publish.GacInstall(<<FullFilePathToTheDll>>)
But it didn't help.
Full exception:
PS C:\Windows\system32> Get-WMQQueue SYSTEM.DEFAULT.LOCAL.QUEUE
Get-WMQQueue : The type initializer for 'IBM.WMQ.Nmqi.BindingsNmqiMQ' threw an exception.
At line:1 char:13
+ Get-WMQQueue <<<< SYSTEM.DEFAULT.LOCAL.QUEUE
+ CategoryInfo : NotSpecified: (:) [Get-WMQQueue], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,WebSphereMQ.GetWMQQueue
Thanks for answers in advance!
dspmqver -a
? – T.Rob