获取异常 "System.TypeInitializationException,WebSphereMQ.<Command Name>" - mo74_PowerShell
Get exception "System.TypeInitializationException,WebSphereMQ.<Command Name>" - mo74_PowerShell
我正在尝试使用 mo74 库,但我总是遇到异常 "System.TypeInitializationException,WebSphereMQ."。
库已安装(我可以通过 WMQ 命令获得帮助)。
我下载它的 link - http://www-01.ibm.com/support/docview.wss?uid=swg24017698
配置:
Windows Server 2008R2
PSVersion 2.0
Broker Version 7.0.0.5
还尝试了 Windows 7、PS 2.0、Broker 7.0.0.5、Windows Server 2012、PS 4.0、Broker 7.0.0.0,结果相同。
安装后我尝试将 WebSphereMQ.dll 添加到 GAC
[Reflection.Assembly]::LoadWithPartialName("System.EnterpriseServices") | Out-Null
[System.EnterpriseServices.Internal.Publish] $publish = new-object System.EnterpriseServices.Internal.Publish
$publish.GacInstall(<<FullFilePathToTheDll>>)
但是没有用。
完全异常:
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
提前感谢您的回答!
该问题已在新版驱动中解决。
Link - http://www-01.ibm.com/support/docview.wss?uid=swg24017698
我正在尝试使用 mo74 库,但我总是遇到异常 "System.TypeInitializationException,WebSphereMQ."。
库已安装(我可以通过 WMQ 命令获得帮助)。
我下载它的 link - http://www-01.ibm.com/support/docview.wss?uid=swg24017698 配置:
Windows Server 2008R2
PSVersion 2.0
Broker Version 7.0.0.5
还尝试了 Windows 7、PS 2.0、Broker 7.0.0.5、Windows Server 2012、PS 4.0、Broker 7.0.0.0,结果相同。
安装后我尝试将 WebSphereMQ.dll 添加到 GAC
[Reflection.Assembly]::LoadWithPartialName("System.EnterpriseServices") | Out-Null
[System.EnterpriseServices.Internal.Publish] $publish = new-object System.EnterpriseServices.Internal.Publish
$publish.GacInstall(<<FullFilePathToTheDll>>)
但是没有用。
完全异常:
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
提前感谢您的回答!
该问题已在新版驱动中解决。 Link - http://www-01.ibm.com/support/docview.wss?uid=swg24017698