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 IndexIBM MQ API SupportSample Application Hangs system

Post new topicReply to topic
Sample Application Hangs system View previous topic :: View next topic
Author Message
techheadgw
PostPosted: Fri Feb 03, 2017 7:35 am Post subject: Sample Application Hangs system Reply with quote

Newbie

Joined: 03 Feb 2017
Posts: 4

I am working on creating a dotnet client to connect to an MQ 8.0 instance and have been having difficulties getting past the instatiation of the MQQueueManager object. Using VS2010/Dot Net 4.0.

Whenever I make a call to MQQueueManager, my system hangs (Win 10 Pro), with a reset being the only thing I can do. I finally just decided to take the "sample code fragment" on the knowledge center site and create a project with it to see what my problem is. It also hangs the system at the same point.

I am suspecting that this has something to do with my local environment, but I did remove and reinstall my local copy of MQ 8.0 several times, to no avail.

My project has a reference to amqmdnet.dll, but no other MQ dlls. I also added the message queue name, host name and channel. Everything else is exactly the same as the sample code.

Any ideas are appreciated as I am quickly running out of things to try.
Back to top
View user's profile Send private message
techheadgw
PostPosted: Fri Feb 03, 2017 7:41 am Post subject: Reply with quote

Newbie

Joined: 03 Feb 2017
Posts: 4

I should also add that the MQ Explorer connects to the server just fine from my system.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Feb 03, 2017 10:50 pm Post subject: Reply with quote

Grand Poobah

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

Would help if you'd show the relevant part of the code...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
techheadgw
PostPosted: Sat Feb 04, 2017 7:47 am Post subject: Reply with quote

Newbie

Joined: 03 Feb 2017
Posts: 4

Here is the code ...

Code:
        /// <summary>
        /// Initialise the connection properties for the connection type requested
        /// </summary>
        /// <param name="connectionType">One of the MQC.TRANSPORT_MQSERIES_ values</param>
        static Hashtable init(String connectionType)
        {
            Hashtable connectionProperties = new Hashtable();

            // Add the connection type
            connectionProperties.Add(MQC.TRANSPORT_PROPERTY, connectionType);

            // Set up the rest of the connection properties, based on the
            // connection type requested
            switch (connectionType)
            {
                case MQC.TRANSPORT_MQSERIES_BINDINGS:
                    break;
                case MQC.TRANSPORT_MQSERIES_CLIENT:
                case MQC.TRANSPORT_MQSERIES_XACLIENT:
                case MQC.TRANSPORT_MQSERIES_MANAGED:
                    connectionProperties.Add(MQC.HOST_NAME_PROPERTY, hostName);
                    connectionProperties.Add(MQC.CHANNEL_PROPERTY, channel);
                    connectionProperties.Add(MQC.USER_ID_PROPERTY, "username");
                    connectionProperties.Add(MQC.PASSWORD_PROPERTY, "");
                    break;
            }

            return connectionProperties;
        }
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static int Main(string[] args)
        {
            try
            {
                Hashtable connectionProperties = init(connectionType);

                // Create a connection to the queue manager using the connection
                // properties just defined
                MQQueueManager qMgr = new MQQueueManager(qManager, connectionProperties);


It hangs up on the last line ... Note that I have also added a username and password (which is blank) to the connection properties.

The hangup occurs when I "Step Through" the line with the debugger. I have noticed that if I just let it run without breakpoints, it does not hang up. So, I am thinking now that it has something to do with the threading and the debugger.
Back to top
View user's profile Send private message
techheadgw
PostPosted: Sat Feb 04, 2017 9:24 am Post subject: Reply with quote

Newbie

Joined: 03 Feb 2017
Posts: 4

So ...

When I just let it go without debugging, it gives me an error that it can't find the mqdc.dll file.

I have registered the DLLs in the \WebSphere MQ\Bin directory, however, that dll is not there.

The installation of the client is in the \WebSphere MQ_1 directory and this ddl exists in that \bin directory.

I cannot register the dll in the VS project because it says it isn't a valid assembly or com component.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sat Feb 04, 2017 10:51 am Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 7856
Location: US: west coast, almost. Otherwise, enroute.

How to install the missing file: http://www-01.ibm.com/support/docview.wss?uid=swg1IC90595
_________________
I would tell you a UDP joke, but you might not get it.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ API SupportSample Application Hangs system
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.