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 » Unable to load DLL (amqxcs2.dll) - System.DllNotFoundExcepti

Post new topic  Reply to topic
 Unable to load DLL (amqxcs2.dll) - System.DllNotFoundExcepti « View previous topic :: View next topic » 
Author Message
solomdan
PostPosted: Fri Jan 04, 2008 7:27 am    Post subject: Unable to load DLL (amqxcs2.dll) - System.DllNotFoundExcepti Reply with quote

Newbie

Joined: 23 Nov 2007
Posts: 7

Using .NET MQ Client v6: On creation of the queue manager I get the Unable to load DLL (amqxcs2.dll) - System.DllNotFoundException

StackTrace Information
*********************************************
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
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 invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
at IBM.WMQ.CommonServices.CreateCommonServices()
at IBM.WMQ.CommonServices.TraceConstructor(String objectId, String sccsid)
at IBM.WMQ.MQQueueManager..ctor(String queueManagerName, Hashtable properties)
at MerrillLynch.Communications.WebSphereQueue.WebSphereQueueManager.Connect()

From what I've found on the web people have only got this exception when they haven't got the full client installed. I however am running 6.0 MQ Client from a FULL CLIENT INSTALL on my development machine.

Any hints as to what could be wrong?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jan 04, 2008 7:55 am    Post subject: Reply with quote

Grand High Poobah

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

The dll is not on the PATH statement?

Check your path...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
solomdan
PostPosted: Fri Jan 04, 2008 8:08 am    Post subject: Reply with quote

Newbie

Joined: 23 Nov 2007
Posts: 7

Thanks but I'm not sure I follow. All I do in my .NET app is add a reference to the amqdnet.dll - I don't directly reference or consume the amqxcs2.dll in my .NET code...

What path are you refererring to exactly?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jan 04, 2008 12:33 pm    Post subject: Reply with quote

Grand High Poobah

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

OS path variable... in this case Windows PATH variable or %PATH%...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
solomdan
PostPosted: Mon Jan 07, 2008 2:50 am    Post subject: Reply with quote

Newbie

Joined: 23 Nov 2007
Posts: 7

Unfortunately the PATH environment variable does include C:\Program Files\IBM\WebSphere MQ\bin so the cause must lie elsewhere.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 07, 2008 7:32 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Are you trying to create a bindings connection, from a client install?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
solomdan
PostPosted: Mon Jan 07, 2008 8:24 am    Post subject: Reply with quote

Newbie

Joined: 23 Nov 2007
Posts: 7

Sorry I'm not sure what kind of connection i'm making - but yes I am using the MQ Client Components installed with the MQ Client install to create the connection.

The line the exception occurs on is:

_manager = new MQQueueManager(_managerName, properties);

_managerName is a string
properties is a hashtable containing only the channel, host and port values. I guess there are many other properties that can be set for which I am using the default values.

Note that other developers use the same code (this error occurs in a common library used by our group) and they have no issues so I am expecting this to be an environment issue with my install.
Back to top
View user's profile Send private message
solomdan
PostPosted: Mon Jan 07, 2008 8:52 am    Post subject: Reply with quote

Newbie

Joined: 23 Nov 2007
Posts: 7

P.S.

I've tried everything from http://www.mqseries.net/phpBB2/viewtopic.php?t=14149 to no avail.

FYI The lowest level of exception information I have been able to get is:

Unable to load DLL (amqxcs2.dll).

Exception Type: System.DllNotFoundException
TypeName:
TargetSite: UInt32 xcsInitialize(UInt16, UInt16, Byte[], Byte[], xcsHPOOL ByRef)
HelpLink: NULL
Source: amqmdxcs

StackTrace Information
*********************************************
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()
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 07, 2008 8:55 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Try specifying a blank or null string for _managerName.

Edit: Also check the Using .NET manual for the checklist of how to specify a given connection type.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
solomdan
PostPosted: Tue Jan 08, 2008 3:11 am    Post subject: Reply with quote

Newbie

Joined: 23 Nov 2007
Posts: 7

Other machines in our group have no issue with the library code that manages the connection to the queue, i.e. those machines connect fine to the same queue so there is no need to change the connection options...

I have one of the support guys comparing our machines/registry settings to see if there is any visible difference in the install of the .NET MQ Client v6.0.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Tue Jan 08, 2008 7:17 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Does MQ Client work at all on this machine? What are the results of running the amqscnxc sample? It should look something like this:


Code:
C:\>amqscnxc -c CHANNEL.CHECKER -x ServerName
Sample AMQSCNXC start
Connecting to the default queue manager
using the server connection channel CHANNEL.CHECKER
on connection name ServerName.
Connection established to queue manager MyQueueManager

Sample AMQSCNXC end

C:\>

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
solomdan
PostPosted: Tue Jan 08, 2008 8:12 am    Post subject: Reply with quote

Newbie

Joined: 23 Nov 2007
Posts: 7

Yes the sample worked... but I have found the cause:

Posting to inform users of the cause

The environment variable PATH was being truncated when returned within the service that was accessing the MQ Client under my windows account, so although the PATH appeared correct when you'd query it at the command line it was missing the path to the MQ Client bin directory at runtime.

When the PATH was accessed from a windows or console application it was not truncated and hence the sample worked. I'm not sure why there is a diffference in behaviour between a service and a console/windows app but discovering this allowed me to resolve.

Note The MQ bin path was at the end of my PATH string

There are articles about this issue on windows machines: http://support.microsoft.com/kb/906469

Hope this helps someone-else one day in the future...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 08, 2008 8:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Heh. Yet another reason why a) I always use *short* paths in PATH, and b) I put MQ stuff up *front*...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wreed
PostPosted: Thu Jan 10, 2008 1:52 pm    Post subject: Reply with quote

Newbie

Joined: 04 Jan 2008
Posts: 6

I had this error after 6.0 install and just wanted to add that a simple reboot fixed it.
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 » Unable to load DLL (amqxcs2.dll) - System.DllNotFoundExcepti
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.