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 Java / JMS » Connet to MQMgr fine with Java but not with .NET - err 2059

Post new topic  Reply to topic
 Connet to MQMgr fine with Java but not with .NET - err 2059 « View previous topic :: View next topic » 
Author Message
Plissken
PostPosted: Wed Aug 25, 2010 7:53 am    Post subject: Connet to MQMgr fine with Java but not with .NET - err 2059 Reply with quote

Newbie

Joined: 25 Aug 2010
Posts: 3

Hi. My MQ is on a separate server installed with a Server-connection channel.

I have been able to connect to my MQmgr (and am able to send, receive, etc.) using Java with basically this code

import com.ibm.mq.*;
...
MQEnvironment.hostname = fQueueHostName;
MQEnvironment.port = fQueuePort;
MQEnvironment.channel = fQueueChannel;
...
fQueueMgr = new MQQueueManager( fQueueMgrName );

where the hostname is an IP addr. I have added a series of .jar files that came with WebSphere MQ.

But with Visual Studio 2005 when I try to connect i get a 2059 error using basically the same code.

using IBM.WMQ;
...
MQEnvironment.Hostname = HostName;
MQEnvironment.Port = QueuePort;
MQEnvironment.Channel = ChannelName;
...
queueManager = new MQQueueManager(QueueManagerName);

Exact same params as the java code. I have added the following references (dlls) that came with WebSphere MQ:

amqmdnet
amqmdnm
amqmdxcs

what am i missing? Thanks.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 25, 2010 7:58 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Slightly odd but check that the user id that the .NET runs under is authorised on the queue manager. I've heard that errors which I believe should be 2035 get reported via .NET as 2059.

Also VS2005 is fairly old. What version of .NET are you using? For that matter, what version of WMQ are you using? Does it have the inbuilt .NET support or are you using the XMS support pac? What Windows OS are involved.

More information, better advice.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Plissken
PostPosted: Wed Aug 25, 2010 8:16 am    Post subject: Reply with quote

Newbie

Joined: 25 Aug 2010
Posts: 3

Thanks Vitor. The user is a generic company user - not sure how to check if it is authorized on the qm but I will look around.

Version of .NET looks like 2.0.50727 SP2, MQ is 6.0 - the DLLs I am using came from the original installation (I am pretty sure). OS on my machine and the server are both same version of XP (v2002 sp3).
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 25, 2010 8:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Plissken wrote:
The user is a generic company user - not sure how to check if it is authorized on the qm but I will look around.


Ask whoever administers the queue manager. Seriously. There's a command they can use.

Plissken wrote:
Version of .NET looks like 2.0.50727 SP2, MQ is 6.0 - the DLLs I am using came from the original installation (I am pretty sure).


You might also want to ask the administrator about the WMQ level. I'd be surprised & alarmed to discover you're using the original 6.0; there should have been some maintenance applied & if not this could be a cause of your woes. Likewise you need to be more than pretty sure where the DLLs came from & if they match. If you're using the original release DLL but the queue manager's had maintenance applied this won't be helping. Especially as .NET used to be supplied by the XMS support pac & was later rolled into the base code.

(I can't remember when & can't be asked to look it up - anyone?)

My point is if you've got the XMS dll & the queue manager has native support this isn't going to end well.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Plissken
PostPosted: Fri Aug 27, 2010 8:26 am    Post subject: Reply with quote

Newbie

Joined: 25 Aug 2010
Posts: 3

I has been confirmed that the DLLs are native to the installation.

Further, I have been able to copy the .exe onto a network drive and run it from the server machine successfully.

Something else I noticed, when I run the .exe on the client, in the command prompt box that has popped up I get the message

"MQM could not display the text for error 536895891."
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Aug 27, 2010 9:01 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You can create a .NET program that will only need one MQ dll - it's called a "managed connection".

I don't believe you are creating such a program.

Perform a full install of the latest MQ v6 client on the machine trying to run this program.

Also, you probably don't want or need to specify the Qmgr name.

Thirdly, you should go look up NMQ_MQ_LIB.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Aug 27, 2010 9:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Plissken wrote:
Further, I have been able to copy the .exe onto a network drive and run it from the server machine successfully.


Then this points the finger fair & square at the configuration of the remote box. I would theorise that when the server install was done someone also installed the client so when run from there it establishes a client connection but there's no client on your remote machine so it tries, unsuccessfully, to establish a managed connection because your code's not set up for that.

If you do have a client on the remote machine, try forcing your code to use it with NMQ_MQ_LIB.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 Java / JMS » Connet to MQMgr fine with Java but not with .NET - err 2059
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.