JMS: failed to open MQ queue (Reason 2035) when trying to receive message
843830May 23 2007 — edited May 24 2007I'm doing a jms testing (weblogic, mq), already done below items, sending is ok (CURDEPTH is added 1) & also browse, but receiving has some problem: MQJE001: Completion Code 2, Reason 2035.
MQJMS2008: failed to open MQ queue.
2035 looks MQRC_NOT_AUTHORIZED, but the application id has been given pemission to put, get message from that queue. Is there anywhere else required to set/check permission? Thanks for help!
JMSAdmin:
define q(mqQ) queue(LocalQueue) qmanager(QueueManager)
define xaqcf(mqXAQCF) qmanager(QueueManager)
weblogic console:
Foreign JMS Servers (WebsphereMQServer) ->
JNDI Initial Context Factory: com.sun.jndi.fscontext.RefFSContextFactory
JNDI Connection URL: file:/path...
MyForeign JMSConnection Factory:
Local JNDI Name:test/XAQCF
Remote JNDI Name:mqXAQCF
MyForeign JMSDestination:
Local JNDI Name:test/Queue
Remote JNDI Name:mqQ
MQ:
application id has been given permission to get/put and also the destination queue: GET(ENABLED) PUT(ENABLED).
factory = (QueueConnectionFactory)context.lookup("test/XAQCF");
queue = (Queue)context.lookup("test/Queue");
//---receive---
queueReceiver = qsession.createReceiver(queue);//exception here
queueReceiver.receive();
//---send---
queueSender= qsession.createSender(queue);
queueSender.send(message);
//---browse---
qBrowse = qsession.createBrowser(queue);
qBrowse.getEnumeration();
...