Topic
  • 4 replies
  • Latest Post - ‏2012-11-09T19:48:21Z by SystemAdmin
SystemAdmin
SystemAdmin
8523 Posts

Pinned topic WebSphere MQ Client - Unable to load DLL amqxcs2.dll

‏2012-03-13T20:29:09Z |
Hi,

In WebSphere MQ Client application got run-time error - System.DllNotFoundException: Unable to load DLL 'amqxcs2.dll' (HRESULT: 0x8007045A)

Environment:
WebSphere MQ Client: 7.0.1.6
Windows: Windows Vista Ultimate / Service Pack 2
System Type: 64-bit
Visual Studio 2010
.NET Framework 4.0

Application:
Standalone windows application.
Failed at queueManager = new MQQueueManager(....) call.

Exception:

System.TypeInitializationException: The type initializer for 'IBM.WMQ.MQQueueManager' threw an exception.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.DllNotFoundException: Unable to load DLL 'amqxcs2.dll': A dynamic link library (DLL) initialization routine failed.
(Exception from HRESULT: 0x8007045A)

at IBM.WMQ.MQCommonServices.xcsInitialize(UInt16 scope, UInt16 attributes, Byte] charName, Byte[ charPrefix, xcsHPOOL& hPool)
at IBM.WMQ.MQCommonServices.Initialize()
at IBM.WMQ.MQCommonServices..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object] args, CultureInfo culture, Object[ activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object] args, CultureInfo culture, Object[ activationAttributes)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object] providedArgs, ParameterModifier[ modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at IBM.WMQ.CommonServices.CreateCommonServices()
at IBM.WMQ.CommonServices.TraceConstructor(String objectId, String sccsid)
at IBM.WMQ.MQBase.TrConstructor(String sccsid, Object[] parms)
at IBM.WMQ.Nmqi.NmqiEnvironment..ctor(NmqiPropertyHandler nmqiPropertyHandler)
at IBM.WMQ.Nmqi.NmqiFactory.GetInstance(NmqiPropertyHandler properties)
at IBM.WMQ.MQQueueManager..cctor()
--- End of inner exception stack trace ---
at IBM.WMQ.MQQueueManager..ctor(String queueManagerName, Hashtable properties)
at OMI.NRDS_Integration.NRDSUpdateProcessor.OpenQueue()
System.TypeInitializationException
Thanks
Updated on 2012-11-09T19:48:21Z at 2012-11-09T19:48:21Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: WebSphere MQ Client - Unable to load DLL amqxcs2.dll

    ‏2012-03-16T19:52:52Z  
    Trace from "Dependency Walker for Win64 (x64)"

    Critical line (crash) is:

    LoadLibraryExW("amqxcs2.dll", 0x0000000000000000, 0x00000000) returned NULL by thread 1. Error: A dynamic link library (DLL) initialization routine failed (1114).

    Complete trace attached.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: WebSphere MQ Client - Unable to load DLL amqxcs2.dll

    ‏2012-03-16T19:55:09Z  
    Trace from "Process Monitor" attached.
  • fjb_saper
    fjb_saper
    206 Posts

    Re: WebSphere MQ Client - Unable to load DLL amqxcs2.dll

    ‏2012-03-25T03:21:52Z  
    Trace from "Process Monitor" attached.
    Do you have a full client installed?
    What is the output of dspmqver -a ?
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: WebSphere MQ Client - Unable to load DLL amqxcs2.dll

    ‏2012-11-09T19:48:21Z  
    • fjb_saper
    • ‏2012-03-25T03:21:52Z
    Do you have a full client installed?
    What is the output of dspmqver -a ?
    I am having the exact same problem. The results from dspmqver - a are as follows:

    C:\Program Files\IBM\WebSphere MQ\bin>dspmqver -a
    Name: WebSphere MQ
    Version: 7.0.1.8
    CMVC level: p701-108-120224
    BuildType: IKAP - (Production)
    Platform: WebSphere MQ for Windows
    Mode: 32-bit
    O/S: Windows 7 Professional Edition, Build 7601: SP1

    Name: WebSphere MQ classes for Java
    Version: 7.0.1.8
    CMVC Level: k701-108-120201
    Build Type: Production

    Name: Java Message Service Client
    Version: 7.0.1.8
    CMVC Level: k701-108-120201
    Build Type: Production

    Name: WebSphere MQ classes for Java Message Service
    Version: 7.0.1.8
    CMVC Level: k701-108-120201
    Build Type: Production

    Name: IBM WebSphere MQ
    Version: 7.0.1.8
    CMVC Level: k701-108-120201 mqjbnd=CC=2;RC=2495;AMQ8568: The native JNI library 'mqjbnd' was not found. 3=mqjbnd::no mqjbnd in java.library.path
    Build Type: Production

    Name: Common Services for Java Platform, Standard Edition
    Version: 7.0.1.8
    CMVC Level: k701-108-120201
    Build Type: Production
    DistHub Build Type:
    DistHub Build Level: DH610-GOLD
    Webscale Distribution Hub Core

    Name: IBM WebSphere MQ custom channel for Windows Communication Foundation
    Version: 7.0.1.0
    CMVC Level: wn701-L110202
    Build Type: Production
    Name: IBM Message Service Client for .NET (XMS .NET)
    Version: 2.0.0.8
    CMVC Level: nn200-L120217.4
    Build Type: Production
    C:\Program Files\IBM\WebSphere MQ\bin>