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 » General WebSphere MQ Support » com.ibm.mq.MQException Completion Code 2, Reason 2035

Post new topic  Reply to topic Goto page 1, 2  Next
 com.ibm.mq.MQException Completion Code 2, Reason 2035 « View previous topic :: View next topic » 
Author Message
EsunYang
PostPosted: Tue Oct 30, 2007 5:06 am    Post subject: com.ibm.mq.MQException Completion Code 2, Reason 2035 Reply with quote

Newbie

Joined: 29 Oct 2007
Posts: 8
Location: China, GuangDong

The host system is solaris 5.8, when Using JMS interface to get message from IBM MQ 5.2, the following errors occur:
Oct 29 16:34:45 2007: ------------------------------------|Provider : MQ
Oct 29 16:34:45 2007: ------------------------------------|MgrName: DPHKCOP
Oct 29 16:34:45 2007: ------------------------------------|QueueName: STARR.COPHK.AF000.REQUEST.DEV
Oct 29 16:34:45 2007: ------------------------------------|ProviderHost : hk1d319cmp.hkg
Oct 29 16:34:45 2007: ------------------------------------|ProviderPort : 1414
Oct 29 16:34:45 2007: ------------------------------------|ProviderChannel : 0000.COPHK.DPHKCOP
Oct 29 16:34:45 2007: ------------------------------------|WaitTime : 2000

Oct 29 16:34:37 2007: javax.jms.JMSException: MQJMS2008: failed to open MQ queue
Oct 29 16:34:37 2007: at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
Oct 29 16:34:37 2007: at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:275)
Oct 29 16:34:37 2007: at com.ubs.pb.cops.starr.message.MQService.getJMSMsg(MQService.java:355)
Oct 29 16:34:38 2007: at com.ubs.pb.cops.starr.message.MsgDispatcher.getJMSMsg(MsgDispatcher.java:347)
Oct 29 16:34:38 2007: at com.ubs.pb.cops.starr.StaRRMsgCollectorBean.process(StaRRMsgCollectorBean.java:222)
Oct 29 16:34:38 2007: com.ibm.mq.MQException: Completion Code 2, Reason 2035
Oct 29 16:34:38 2007: at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1050)
Oct 29 16:34:38 2007: at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1095)
Oct 29 16:34:38 2007: at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:273)
Oct 29 16:34:38 2007: at com.ubs.pb.cops.starr.message.MQService.getJMSMsg(MQService.java:355)
Oct 29 16:34:38 2007: at com.ubs.pb.cops.starr.message.MsgDispatcher.getJMSMsg(MsgDispatcher.java:347)
Oct 29 16:34:38 2007: at com.ubs.pb.cops.starr.StaRRMsgCollectorBean.process(StaRRMsgCollectorBean.java:222)


And I am sure the queue(STARR.COPHK.AF000.REQUEST.DEV) allow put and get messge and the channel not using SSL.
Not change anything on MQ setting and using IBM MQ interface to get messge from the same queue, all things is OK. it is very strange. why JMS interface can not get message but IBM MQ interface can ????
The following source codes, one is using JMS interface and other using IBM MQ interface:

Source code sample using JMS interface:
public void getJMSMsg(JMSProviderInfo providerInfo, CopsMessage message) throws JMSException
{
QueueSession session = null;
Queue ioQueue;
QueueReceiver queueReceiver = null;
boolean transacted = false;
String selector = null;

try
{
java.lang.Integer portNumber = new Integer(providerInfo.providerport);

factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP); // Client mode
factory.setHostName(providerInfo.providerhost);
factory.setPort(portNumber.intValue());
factory.setChannel(providerInfo.providerchannel);
factory.setQueueManager(providerInfo.mgrname);
factory.setCCSID(MQCCSID);

if (connection != null){
connection.close();
connection = null;
}

connection = factory.createQueueConnection();
connection.start();
session = connection.createQueueSession(transacted, Session.AUTO_ACKNOWLEDGE);
ioQueue = session.createQueue( providerInfo.queuename );

if (message.jmsMessageId != null && message.jmsCorrelationId != null){
selector = "JMSMessageID = '" + message.jmsMessageId + "'";
selector = selector + " AND JMSCorrelationID = '" + message.jmsCorrelationId + "'";
}else if (message.jmsMessageId != null && message.jmsCorrelationId == null){
selector = "JMSMessageID = '" + message.jmsMessageId + "'";
}else if (message.jmsMessageId == null && message.jmsCorrelationId != null){
selector = "JMSCorrelationID = '" + message.jmsCorrelationId + "'";
}else
selector = null;

queueReceiver = session.createReceiver(ioQueue, selector);

Message inMessage = queueReceiver.receive(message.waitTime.intValue());

if (inMessage != null){
if (inMessage instanceof TextMessage){
message.content = ((TextMessage) inMessage).getText();
}else{
throw new JMSException("Unknown message type!");
}

message.jmsMessageId = inMessage.getJMSMessageID();
message.jmsCorrelationId = inMessage.getJMSCorrelationID();

// Get message properties
Set set = message.msgProperties.keySet();
Iterator iterator = set.iterator();
String property;
while(iterator.hasNext()){
property = (String)iterator.next();
message.msgProperties.put( property, inMessage.getStringProperty(property));
}
}else
throw new JMSException("No Message in MQ, Completion code 2 Reason code 2033");

}finally{
if (queueReceiver != null) {
queueReceiver.close();
queueReceiver = null;
}

if (session != null){
session.close();
session = null;
}

if (connection != null) {
connection.close();
connection = null;
}
}

}
// getJMSMsg




Source code sample using IBM MQ interface:
private void retrieveMsg
(java.lang.String hostName,
java.lang.String port,
java.lang.String mgrName,
java.lang.String queueName,
BCD.BinaryHolder msgId,
BCD.BinaryHolder correlId,
org.omg.CORBA.StringHolder msg,
boolean forBrowse,
java.lang.String channel,
java.lang.String waitTime,
java.lang.String exclusive) throws java.lang.Exception
{
// MQQueueManager qMgr = null;
// MQQueue getQueue = null;
try
{
java.lang.Integer portNumber = new Integer(port);
MQEnvironment.hostname = hostName;
MQEnvironment.port = portNumber.intValue();
MQEnvironment.channel = channel;

if (qMgr != null) {
qMgr.disconnect();
qMgr = null;
}
qMgr = new MQQueueManager(mgrName);

// Set up the options on the queue we wish to open...
int openOptions;
if (forBrowse) openOptions = MQC.MQOO_BROWSE;
else if (exclusive.equalsIgnoreCase("true")) openOptions = MQC.MQOO_INPUT_EXCLUSIVE;
else openOptions = MQC.MQOO_INPUT_SHARED;

// Now specify the queue that we wish to open,
// and the open options...
getQueue = qMgr.accessQueue(queueName,openOptions);

// prepare MQMessage
MQMessage retMsg = new MQMessage();
// Use a specified message identifier if exists
if (msgId.value != null && msgId.value.length != 0)
retMsg.messageId = msgId.value;
// Use a specified correlation identifier if exists
if (correlId.value != null && correlId.value.length != 0)
retMsg.correlationId = correlId.value;

// Set the get message options...
MQGetMessageOptions gmo = new MQGetMessageOptions(); // accept the defaults
// same as MQGMO_DEFAULT
// Wait for a suitable message
gmo.options = MQC.MQGMO_WAIT;
if (forBrowse) gmo.options = gmo.options | MQC.MQGMO_BROWSE_FIRST;
java.lang.Integer waitTimeInterval = new Integer(waitTime);
gmo.waitInterval = waitTimeInterval.intValue(); // wait up to waittime milliseconds

// get/browse the message off the queue...
getQueue.get(retMsg,gmo);

// And prove we have the message by returning the message text
msg.value = retMsg.readString(retMsg.getTotalMessageLength());
msgId.value = retMsg.messageId;
correlId.value = retMsg.correlationId;
}
catch (MQException mex)
{
//Log.write("An MQSeries error occurred : Completion code " +
// mex.completionCode + " Reason code " + mex.reasonCode);
throw new Exception("An MQSeries error occurred : Completion code " +
mex.completionCode + " Reason code " + mex.reasonCode);
}
// Was it a Java buffer space error?
catch (IOException ex)
{
//Log.write("An error occurred whilst reading the message buffer: " + ex);
throw new Exception("An error occurred whilst reading the message buffer: " + ex);
}
finally
{
// Close the queue...
if (getQueue != null) {
getQueue.close();
getQueue = null;
}

// Disconnect from the manager...
if (qMgr != null) {
qMgr.disconnect();
qMgr = null;
}
}
} // retrieveMsg


Last edited by EsunYang on Tue Oct 30, 2007 7:59 pm; edited 2 times in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 30, 2007 5:11 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's ridiculous to be using MQ v5.2.

It's unsecure, unsupported, and unperformant compared to MQ v6.

This has nothing to do with your problem.

JMS is likely running your code as a specific user, in the App Server configuration. That user is likely not authorized.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EsunYang
PostPosted: Tue Oct 30, 2007 6:13 pm    Post subject: Help... Pls give the resolvation Reply with quote

Newbie

Joined: 29 Oct 2007
Posts: 8
Location: China, GuangDong

Thanks "jefflowrey" reply, Could you give me the resolvation.

In our system update MQ 5.2 to MQ 6.0 is impossible for all of our applications are using MQ 5.2, if update it many area will be impacted.
By the way, our app server is Sybase EAServer 4.1
If JMS runing as specail user, Could you tell me how can I resolve this problem?
when debuging the application I have open MQ trace function, the following log may be give you some of usefull message, and we can see that the JMS interface and the MQ interface user id are null too:

JMS interface trace log:

Oct 29 15:17:56 2007: 03:17:56 [1193642276399] Thread: Thread-14, Object: com.ibm.mq.MQQueueManager@4d107f ==> accessQueue() entry
Oct 29 15:17:56 2007: 03:17:56 [1193642276429] Thread: Thread-14, Object: com.ibm.mq.MQOD@b6548 ==> MQOD constructor() entry
Oct 29 15:17:56 2007: 03:17:56 [1193642276453] Thread: Thread-14, Object: com.ibm.mq.MQOD@b6548 @(#) common/javabase/com/ibm/mq/MQOD.java, java, j000, j000-L010307 00/04/19 17:50:04
Oct 29 15:17:56 2007: 03:17:56 [1193642276483] Thread: Thread-14, Object: com.ibm.mq.MQOD@b6548 <== MQOD constructor() exit
Oct 29 15:17:56 2007: 03:17:56 [1193642276650] Thread: Thread-14, Object: com.ibm.mq.MQQueue@269997 ==> MQManagedObject constructor() entry
Oct 29 15:17:56 2007: 03:17:56 [1193642276680] Thread: Thread-14, Object: com.ibm.mq.MQQueue@269997 @(#) common/javabase/com/ibm/mq/MQManagedObject.java, java, j000, j000-L010307 00/12/19 13:43:30
Oct 29 15:17:56 2007: 03:17:56 [1193642276704] Thread: Thread-14, Object: com.ibm.mq.MQQueue@269997 <== MQManagedObject constructor() exit
Oct 29 15:17:56 2007: 03:17:56 [1193642276734] Thread: Thread-14, Object: com.ibm.mq.MQQueue@269997 ==> MQQueue default constructor() entry
Oct 29 15:17:56 2007: 03:17:56 [1193642276763] Thread: Thread-14, Object: com.ibm.mq.MQQueue@269997 @(#) common/javabase/com/ibm/mq/MQQueue.java, java, j000, j000-L010307 01/02/08 14:01:36
Oct 29 15:17:56 2007: 03:17:56 [1193642276794] Thread: Thread-14, Object: com.ibm.mq.MQQueue@269997 <== MQQueue default constructor() exit
Oct 29 15:17:57 2007: 03:17:57 [1193642277062] Thread: Thread-14, Object: com.ibm.mq.MQQueueManager@4d107f queue = STARR.COPHK.AF000.REQUEST.DEV
queue manager =
dynamic queue name = AMQ.*
alternate user id =
options = 41
Oct 29 15:17:57 2007: 03:17:57 [1193642277092] Thread: Thread-14 ==> MQSESSIONClient::MQOPEN() entry
Oct 29 15:17:57 2007: 03:17:57 [1193642277242] Thread: Thread-14, Object: com.ibm.mq.MQOD@b6548 ==> writeTo() entry
Oct 29 15:17:57 2007: 03:17:57 [1193642277391] Thread: Thread-14 ==> MQSESSION::setStringToLength() entry
Oct 29 15:17:57 2007: 03:17:57 [1193642277547] Thread: Thread-14 <== MQSESSION::setStringToLength() exit
Oct 29 15:17:57 2007: 03:17:57 [1193642277887] Thread: Thread-14 ==> MQSESSION::setStringToLength() entry
Oct 29 15:17:57 2007: 03:17:57 [1193642277911] Thread: Thread-14 <== MQSESSION::setStringToLength() exit
Oct 29 15:17:57 2007: 03:17:57 [1193642277935] Thread: Thread-14 ==> MQSESSION::setStringToLength() entry
Oct 29 15:17:58 2007: 03:17:58 [1193642278079] Thread: Thread-14 <== MQSESSION::setStringToLength() exit
Oct 29 15:17:58 2007: 03:17:58 [1193642278198] Thread: Thread-14 ==> MQSESSION::setStringToLength() entry
Oct 29 15:17:58 2007: 03:17:58 [1193642278414] Thread: Thread-14 <== MQSESSION::setStringToLength() exit
Oct 29 15:17:58 2007: 03:17:58 [1193642278605] Thread: Thread-14, Object: com.ibm.mq.MQOD@b6548 <== writeTo() exit
Oct 29 15:17:58 2007: 03:17:58 [1193642278629] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 ==> buildAPIHeader() entry
Oct 29 15:18:00 2007: 03:18:00:[1193642280249] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 <== buildAPIHeader() exit
Oct 29 15:18:00 2007: 03:18:00:[1193642280281] Thread: Thread-14 Class: MQSESSIONClient Obtaining lock on MQInternalCommunications object
Oct 29 15:18:00 2007: 03:18:00:[1193642280973] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 ==> send() entry
Oct 29 15:18:01 2007: 03:18:01:[1193642281153] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 TSH type = 131
Oct 29 15:18:01 2007: 03:18:01:[1193642281183] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 Sending data, 172 bytes of msg data remain
Oct 29 15:18:01 2007: 03:18:01:[1193642281212] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 Last segment of message
Oct 29 15:18:01 2007: 03:18:01:[1193642281242] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 ==> writeTSH() entry
Oct 29 15:18:01 2007: 03:18:01:[1193642281272] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 <== writeTSH() exit
Oct 29 15:18:01 2007: 03:18:01:[1193642281960] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 ==> invokeSendExit() entry
Oct 29 15:18:02 2007: 03:18:01:[1193642281990] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 No user send exit was invoked
Oct 29 15:18:02 2007: 03:18:02:[1193642282020] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 <== invokeSendExit() exit
Oct 29 15:18:02 2007: 03:18:02:[1193642282205] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 <== send() exit
Oct 29 15:18:02 2007: 03:18:02:[1193642282233] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 ==> receive() entry
Oct 29 15:18:02 2007: 03:18:02:[1193642282397] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 Waiting for data on input stream.
Oct 29 15:18:03 2007: 03:18:03:[1193642283013] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 Receiving 216 bytes of data.
Oct 29 15:18:03 2007: 03:18:03:[1193642283276] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 ==> invokeReceiveExit() entry
Oct 29 15:18:03 2007: 03:18:03:[1193642283306] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 No user receive exit was invoked
Oct 29 15:18:03 2007: 03:18:03:[1193642283337] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 <== invokeReceiveExit() exit
Oct 29 15:18:03 2007: 03:18:03:[1193642283365] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 ==> readTSH() entry
Oct 29 15:18:03 2007: 03:18:03:[1193642283758] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 <== readTSH() exit
Oct 29 15:18:03 2007: 03:18:03:[1193642283794] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 Data received.
Oct 29 15:18:03 2007: 03:18:03:[1193642283958] Thread: Thread-14, Object: com.ibm.mq.MQInternalCommunications@372656 <== receive() exit
Oct 29 15:18:04 2007: 03:18:03:[1193642283988] Thread: Thread-14 Class: MQSESSIONClient Releasing lock on MQInternalCommunications object
Oct 29 15:18:04 2007: 03:18:04:[1193642284018] Thread: Thread-14, Object: com.ibm.mq.MQOD@b6548 ==> readFrom() entry
Oct 29 15:18:04 2007: 03:18:04:[1193642284197] Thread: Thread-14, Object: com.ibm.mq.MQOD@b6548 <== readFrom() exit
Oct 29 15:18:04 2007: 03:18:04:[1193642284577] Thread: Thread-14 Class: MQSESSIONClient CC,RC = 2,2035
Oct 29 15:18:04 2007: 03:18:04:[1193642284607] Thread: Thread-14 <== MQSESSIONClient::MQOPEN() exit
Oct 29 15:18:04 2007: 03:18:04:[1193642284756] Thread: Thread-14, Object: com.ibm.mq.MQException: Completion Code 2, Reason 2035 ==> MQException constructor: CC = 2 RC = 2035 thrown by com.ibm.mq.MQQueueManager@4d107f() entry
Oct 29 15:18:04 2007: 03:18:04:[1193642284816] Thread: Thread-14, Object: com.ibm.mq.MQException: Completion Code 2, Reason 2035 common/javabase/com/ibm/mq/MQException.java, java, j000, j000-L010307.1 01/03/06 20:39:52 @(#) 1.26
Oct 29 15:18:04 2007: 03:18:04:[1193642284888] Thread: Thread-14, Object: com.ibm.mq.MQException: Completion Code 2, Reason 2035 <== MQException constructor() exit
Oct 29 15:18:05 2007: 03:18:05:[1193642285139] Thread: Thread-14, Object: com.ibm.mq.MQQueueManager@4d107f ==> errorOccurred() entry
Oct 29 15:18:05 2007: 03:18:05:[1193642285288] Thread: Thread-14 ==> ReasonCodeInfo::getReasonCodeCategory() entry
Oct 29 15:18:05 2007: 03:18:05:[1193642285527] Thread: Thread-14 <== ReasonCodeInfo::getReasonCodeCategory() exit
Oct 29 15:18:05 2007: 03:18:05:[1193642285557] Thread: Thread-14, Object: com.ibm.mq.MQQueueManager@4d107f <== errorOccurred() exit
Oct 29 15:18:05 2007: 03:18:05:[1193642285707] Thread: Thread-14, Object: com.ibm.mq.MQQueueManager@4d107f <== accessQueue (via exception)() exit


MQ interface trace log:


Oct 29 15:17:53 2007: 03:17:53 [1193642273802] Thread: Thread-8, Object: com.ibm.mq.MQQueueManager@138039 ==> accessQueue() entry
Oct 29 15:17:54 2007: 03:17:54 [1193642274163] Thread: Thread-8, Object: com.ibm.mq.MQOD@32c6a6 ==> MQOD constructor() entry
Oct 29 15:17:54 2007: 03:17:54 [1193642274199] Thread: Thread-8, Object: com.ibm.mq.MQOD@32c6a6 @(#) common/javabase/com/ibm/mq/MQOD.java, java, j000, j000-L010307 00/04/19 17:50:04
Oct 29 15:17:54 2007: 03:17:54 [1193642274232] Thread: Thread-8, Object: com.ibm.mq.MQOD@32c6a6 <== MQOD constructor() exit
Oct 29 15:17:54 2007: 03:17:54 [1193642274349] Thread: Thread-8, Object: com.ibm.mq.MQQueue@ffb38 ==> MQManagedObject constructor() entry
Oct 29 15:17:54 2007: 03:17:54 [1193642274376] Thread: Thread-8, Object: com.ibm.mq.MQQueue@ffb38 @(#) common/javabase/com/ibm/mq/MQManagedObject.java, java, j000, j000-L010307 00/12/19 13:43:30
Oct 29 15:17:54 2007: 03:17:54 [1193642274406] Thread: Thread-8, Object: com.ibm.mq.MQQueue@ffb38 <== MQManagedObject constructor() exit
Oct 29 15:17:54 2007: 03:17:54 [1193642274438] Thread: Thread-8, Object: com.ibm.mq.MQQueue@ffb38 ==> MQQueue default constructor() entry
Oct 29 15:17:54 2007: 03:17:54 [1193642274468] Thread: Thread-8, Object: com.ibm.mq.MQQueue@ffb38 @(#) common/javabase/com/ibm/mq/MQQueue.java, java, j000, j000-L010307 01/02/08 14:01:36
Oct 29 15:17:54 2007: 03:17:54 [1193642274502] Thread: Thread-8, Object: com.ibm.mq.MQQueue@ffb38 <== MQQueue default constructor() exit
Oct 29 15:17:54 2007: 03:17:54 [1193642274731] Thread: Thread-8, Object: com.ibm.mq.MQQueueManager@138039 queue = EQI00.COPHK.A0000.MSG
queue manager =
dynamic queue name = AMQ.*
alternate user id =
options = 4
Oct 29 15:17:54 2007: 03:17:54 [1193642274762] Thread: Thread-8 ==> MQSESSIONClient::MQOPEN() entry
Oct 29 15:17:54 2007: 03:17:54 [1193642274910] Thread: Thread-8, Object: com.ibm.mq.MQOD@32c6a6 ==> writeTo() entry
Oct 29 15:17:55 2007: 03:17:55 [1193642275090] Thread: Thread-8 ==> MQSESSION::setStringToLength() entry
Oct 29 15:17:55 2007: 03:17:55 [1193642275389] Thread: Thread-8 <== MQSESSION::setStringToLength() exit
Oct 29 15:17:55 2007: 03:17:55 [1193642275538] Thread: Thread-8 ==> MQSESSION::setStringToLength() entry
Oct 29 15:17:55 2007: 03:17:55 [1193642275717] Thread: Thread-8 <== MQSESSION::setStringToLength() exit
Oct 29 15:17:56 2007: 03:17:56 [1193642276022] Thread: Thread-8 ==> MQSESSION::setStringToLength() entry
Oct 29 15:17:56 2007: 03:17:56 [1193642276052] Thread: Thread-8 <== MQSESSION::setStringToLength() exit
Oct 29 15:17:56 2007: 03:17:56 [1193642276184] Thread: Thread-8 ==> MQSESSION::setStringToLength() entry
Oct 29 15:17:56 2007: 03:17:56 [1193642276345] Thread: Thread-8 <== MQSESSION::setStringToLength() exit
Oct 29 15:17:56 2007: 03:17:56 [1193642276429] Thread: Thread-14, Object: com.ibm.mq.MQOD@b6548 ==> MQOD constructor() entry
Oct 29 15:17:57 2007: 03:17:57 [1193642277003] Thread: Thread-8, Object: com.ibm.mq.MQOD@32c6a6 <== writeTo() exit
Oct 29 15:17:57 2007: 03:17:57 [1193642277033] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd ==> buildAPIHeader() entry
Oct 29 15:17:57 2007: 03:17:57 [1193642277439] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd <== buildAPIHeader() exit
Oct 29 15:17:57 2007: 03:17:57 [1193642277463] Thread: Thread-8 Class: MQSESSIONClient Obtaining lock on MQInternalCommunications object
Oct 29 15:17:57 2007: 03:17:57 [1193642277487] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd ==> send() entry
Oct 29 15:17:57 2007: 03:17:57 [1193642277512] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd TSH type = 131
Oct 29 15:17:57 2007: 03:17:57 [1193642277959] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd Sending data, 172 bytes of msg data remain
Oct 29 15:17:58 2007: 03:17:58 [1193642278103] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd Last segment of message
Oct 29 15:17:58 2007: 03:17:58 [1193642278126] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd ==> writeTSH() entry
Oct 29 15:17:58 2007: 03:17:58 [1193642278437] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd <== writeTSH() exit
Oct 29 15:17:59 2007: 03:17:59 [1193642279388] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd ==> invokeSendExit() entry
Oct 29 15:17:59 2007: 03:17:59 [1193642279436] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd No user send exit was invoked
Oct 29 15:17:59 2007: 03:17:59 [1193642279484] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd <== invokeSendExit() exit
Oct 29 15:17:59 2007: 03:17:59 [1193642279657] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd <== send() exit
Oct 29 15:17:59 2007: 03:17:59 [1193642279687] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd ==> receive() entry
Oct 29 15:17:59 2007: 03:17:59 [1193642279711] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd Waiting for data on input stream.
Oct 29 15:18:00 2007: 03:18:00:[1193642280220] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd Receiving 216 bytes of data.
Oct 29 15:18:00 2007: 03:18:00:[1193642280399] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd ==> invokeReceiveExit() entry
Oct 29 15:18:00 2007: 03:18:00:[1193642280429] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd No user receive exit was invoked
Oct 29 15:18:00 2007: 03:18:00:[1193642280459] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd <== invokeReceiveExit() exit
Oct 29 15:18:00 2007: 03:18:00:[1193642280495] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd ==> readTSH() entry
Oct 29 15:18:00 2007: 03:18:00:[1193642280525] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd <== readTSH() exit
Oct 29 15:18:00 2007: 03:18:00:[1193642280554] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd Data received.
Oct 29 15:18:00 2007: 03:18:00:[1193642280584] Thread: Thread-8, Object: com.ibm.mq.MQInternalCommunications@5311bd <== receive() exit
Oct 29 15:18:00 2007: 03:18:00:[1193642280614] Thread: Thread-8 Class: MQSESSIONClient Releasing lock on MQInternalCommunications object
Oct 29 15:18:01 2007: 03:18:01:[1193642281063] Thread: Thread-8, Object: com.ibm.mq.MQOD@32c6a6 ==> readFrom() entry
Oct 29 15:18:01 2007: 03:18:01:[1193642281303] Thread: Thread-8, Object: com.ibm.mq.MQOD@32c6a6 <== readFrom() exit
Oct 29 15:18:01 2007: 03:18:01:[1193642281332] Thread: Thread-8 Class: MQSESSIONClient CC,RC = 0,0
Oct 29 15:18:01 2007: 03:18:01:[1193642281362] Thread: Thread-8 <== MQSESSIONClient::MQOPEN() exit
Oct 29 15:18:01 2007: 03:18:01:[1193642281392] Thread: Thread-8, Object: com.ibm.mq.MQQueueManager@138039 Opened queue name = EQI00.COPHK.A0000.MSG
Oct 29 15:18:01 2007: 03:18:01:[1193642281422] Thread: Thread-8, Object: com.ibm.mq.MQQueueManager@138039 <== accessQueue() exit


Last edited by EsunYang on Tue Oct 30, 2007 8:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 30, 2007 7:02 pm    Post subject: Reply with quote

Grand Poobah

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

Do not forget that JMS needs more permissions than java base.
Quote:
OK. it is very strange. why JMS interface can not get message but IBM MQ interface can ????


Did you make sure to grant the inquire permission on the queue. JMS needs that on top of put or get.

Usually I grant allmqi and when needed subtract from that.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
EsunYang
PostPosted: Tue Oct 30, 2007 7:54 pm    Post subject: how can I grant the inquire permission on the queue? Reply with quote

Newbie

Joined: 29 Oct 2007
Posts: 8
Location: China, GuangDong

Thanks for fjb_saper reply.
According to MQ trace log, JMS seem as using "options = 41" to access Queue, that is (MQC.MQOO_INQUIRE = 32) + (MQC.MQOO_BROWSE = 8 ) + (MQC.MQOO_INPUT_AS_Q_DEF = 1). this mean that JMS need browse the queue when get message. I can sure that the queue have been allowed to put and get message, but when setting queue option I can't see the inquire permission setting.
Could you tell me how can I grant the inquire permission on the queue?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 31, 2007 1:28 am    Post subject: Re: how can I grant the inquire permission on the queue? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 20912
Location: Ohio, USA

EsunYang wrote:

Could you tell me how can I grant the inquire permission on the queue?


+inq or as fjb_saper suggests +allmqi and remove anything you don't want granted.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Wed Oct 31, 2007 5:49 am    Post subject: Reply with quote

Guardian

Joined: 09 Feb 2006
Posts: 932
Location: Derby City, USA

Of course, if you are coming in on a client channel (for sure since this is V2), then just connect with a BLANK for the ID. You will have full administrative access if no MCAUSER is set and no Security Exit prevents this...

Why would it be impossible to upgrade? Don't you have maintenance windows?
_________________
Joseph

Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3
Back to top
View user's profile Send private message AIM Address
JosephGramig
PostPosted: Wed Oct 31, 2007 5:52 am    Post subject: Reply with quote

Guardian

Joined: 09 Feb 2006
Posts: 932
Location: Derby City, USA

Opps, I meant V5.2 but it is all so old that it doesn't matter.

Plus, if you believe it is impossible to upgrade, then for you "It is impossible".
_________________
Joseph

Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3
Back to top
View user's profile Send private message AIM Address
EsunYang
PostPosted: Wed Oct 31, 2007 5:41 pm    Post subject: Reply with quote

Newbie

Joined: 29 Oct 2007
Posts: 8
Location: China, GuangDong

One thing should be known, the queue STARR.COPHK.AF000.REQUEST.DEV is a alias queue.
In our developing environment, the MQ version is 5.3, no setting any permission on the MQ manager and queue after installed the MQ, JMS interface and MQ interface program are work and no errors.
But when I promote it to production environment, the same error still occur. In production environment the MQ version is 5.2, and our MQ team workmates tell me that they have added allmqi permission to the queue, Do they miss some of step when add allmqi permission to the queue? or need restart the MQ?
The production environment setting is our of my control, so i can't update anything on the production environment and a little update must be carefull, shuch as restart MQ.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Oct 31, 2007 8:02 pm    Post subject: Reply with quote

Grand Poobah

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

Don't know about 5.2 but in 5.3 if anything changed at OS level (group membership, new user etc...) we usually ran mqsc REFRESH SECURITY...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
EsunYang
PostPosted: Thu Nov 01, 2007 1:15 am    Post subject: On MQ message how to set self-definithion property?? Reply with quote

Newbie

Joined: 29 Oct 2007
Posts: 8
Location: China, GuangDong

I decide not to use JMS interface to get message from MQ for the un-resolving problem(com.ibm.mq.MQException: Completion Code 2, Reason 2035), but i have a question: how can set the self-definithion property on MQ message like as JMS TextMessage.setStringProperty(property, "Self_definition_property")?? If you can give some of sample code will best.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Nov 01, 2007 2:39 am    Post subject: Reply with quote

Grand Poobah

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

Be aware that those properties reside only in the RFH2 header and that your non JMS receiver will need to deal with this header or lose this additional information...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
EsunYang
PostPosted: Thu Nov 01, 2007 4:20 am    Post subject: how to read or write RFH2 header Reply with quote

Newbie

Joined: 29 Oct 2007
Posts: 8
Location: China, GuangDong

Thanks for fjb_saper reply.
You are right. If the both of sender and the receiver use MQ interface to process message, how about? I have read many IBM MQ document, but can not find how to read or write RFH2 header, fjb_saper, do you know how to do it?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Nov 01, 2007 2:33 pm    Post subject: Re: how to read or write RFH2 header Reply with quote

Grand Poobah

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

EsunYang wrote:
Thanks for fjb_saper reply.
You are right. If the both of sender and the receiver use MQ interface to process message, how about? I have read many IBM MQ document, but can not find how to read or write RFH2 header, fjb_saper, do you know how to do it?


If you are non JMS and non java and need to read/write the RFH header look into the XMS support pack (Messaging interface or whatever it is called). It supplies a JMS like interface for non java languages.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
EsunYang
PostPosted: Sun Nov 04, 2007 11:18 pm    Post subject: Re: how to read or write RFH2 header Reply with quote

Newbie

Joined: 29 Oct 2007
Posts: 8
Location: China, GuangDong

fjb_saper wrote:

If you are non JMS and non java and need to read/write the RFH header look into the XMS support pack (Messaging interface or whatever it is called). It supplies a JMS like interface for non java languages.


All of my application are runing on Sybase EAServer, so the appliation must use java. Are there any java API or package to read/write MQRFH2 header?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General WebSphere MQ Support » com.ibm.mq.MQException Completion Code 2, Reason 2035
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.