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 » 2121 error with MQ API for Java

Post new topic  Reply to topic
 2121 error with MQ API for Java « View previous topic :: View next topic » 
Author Message
balareddy
PostPosted: Sun Mar 12, 2006 10:07 pm    Post subject: 2121 error with MQ API for Java Reply with quote

Acolyte

Joined: 06 Feb 2006
Posts: 54

Hi,

I am trying sample with MQ API for Java. when i try MQQueueManager.begin(), i am getting 2121 reason code.

I am not using any dtabase connection also. pure MQ Java.

Pls tell me the reason and solution...
_________________
bala
Back to top
View user's profile Send private message AIM Address
elvis_gn
PostPosted: Sun Mar 12, 2006 10:10 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi balareddy,

Could you paste the code before you try to do the .begin()

What is the environment....i mean, r u running an MQ client/server, windows/AIX....what version of MQ..

Regards.
Back to top
View user's profile Send private message Send e-mail
balareddy
PostPosted: Sun Mar 12, 2006 10:16 pm    Post subject: Reply with quote

Acolyte

Joined: 06 Feb 2006
Posts: 54

elvis_gn wrote:
Hi balareddy,

Could you paste the code before you try to do the .begin()


MQQueueManager theQueueManager = new MQQueueManager("QM.TEST");
theQueueManager.begin();
MQQueue queue = theQueueManager.accessQueue(QUEUE_NAME, MQC.MQOO_INPUT_AS_Q_DEF| MQC.MQOO_OUTPUT, null, null, null);
MQMessage msg = new MQMessage();
MQPutMessageOptions pmo = new MQPutMessageOptions();
queue.put(msg, pmo);


elvis_gn wrote:

What is the environment....i mean, r u running an MQ client/server, windows/AIX....what version of MQ..

Regards.



I am Trying in AIX5.2 with MQ5.3 Server. iam running MQServer only.
_________________
bala
Back to top
View user's profile Send private message AIM Address
elvis_gn
PostPosted: Sun Mar 12, 2006 10:30 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi balareddy,

I guess you will be running the queue managers before you run your application

there is no need to use that line for starting the queue manager...you can do away with it and try...there are some samples here on the forum....try those.

Regards.
Back to top
View user's profile Send private message Send e-mail
balareddy
PostPosted: Sun Mar 12, 2006 10:44 pm    Post subject: Reply with quote

Acolyte

Joined: 06 Feb 2006
Posts: 54

Actually i tried XA with MQ java. i configured ini file and acreated switch file for Oralce. that time it gave 2121 error. so i narrowed down where the problem accurs. i removed Oracle code fully and tried with QM.Begin(). it throws the same error.

I thought 2121 problem is only with QM java not when using XA.
_________________
bala
Back to top
View user's profile Send private message AIM Address
mvic
PostPosted: Mon Mar 13, 2006 3:22 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

balareddy wrote:
theQueueManager.begin();

This calls MQBEGIN. MQBEGIN tries to begin a global unit of work. Otherwise known as a distributed unit of work. Or a two-phase commit transaction. (I bet there are other alternative terms too).

If you have no XAResourceManager stanza in your qm.ini file, you will get failure of MQBEGIN, with reason code MQRC_NO_EXTERNAL_PARTICIPANTS (2121).

Quote:
i removed Oracle code fully and tried with QM.Begin(). it throws the same error

Since you are not using a database in this example, remove the qmgr.begin() call.

Another important point: if you want to start an MQ-only unit of work, you'll have to put MQPMO_SYNCPOINT in the pmo.

See http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzak.doc/csqzak10255.htm

If it still fails, post again with the amended source - it really helps us understand what's going on.

Hope this helps
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 » 2121 error with MQ API for Java
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.