Author |
Message
|
tosaurav |
Posted: Wed Feb 07, 2007 12:22 pm Post subject: JMS Client throwing Exception |
|
|
Acolyte
Joined: 16 Jan 2007 Posts: 62
|
Any Pointers...???
JMS Client throwing following exception while sending text message.
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009.
Following is the Error egenerated using linked exception
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
at com.ibm.mq.MQQueue.putMsg2(MQQueue.java:1498)
at com.ibm.mq.jms.MQMessageProducer.sendInternal(MQMessageProducer.java:1569)
at com.ibm.mq.jms.MQMessageProducer.send(MQMessageProducer.java:1012)
at com.ibm.mq.jms.MQMessageProducer.send(MQMessageProducer.java:1046)
at com.ibm.ejs.jms.JMSMessageProducerHandle.send(JMSMessageProducerHandle.java:1165)
at gov.uspto.eai.generic.util.JMSClient.sendTextMessage(JMSClient.java:296)
at gov.uspto.eai.generic.mdb.AbstractEaiMDB.sendSuccessStatusMessage(AbstractEaiMDB.java:184)
at gov.uspto.eai.generic.mdb.AbstractEaiMDB.onMessage(AbstractEaiMDB.java:91)
at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:316)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:285)
at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:263)
at com.ibm.mq.jms.MQSession.run(MQSession.java:1650)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:960)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:813)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:614)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:456)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.mq.MQQueue.putMsg2(MQQueue.java:1498)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.mq.jms.MQMessageProducer.sendInternal(MQMessageProducer.java:1569)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.mq.jms.MQMessageProducer.send(MQMessageProducer.java:1012)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.mq.jms.MQMessageProducer.send(MQMessageProducer.java:1046)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.ejs.jms.JMSMessageProducerHandle.send(JMSMessageProducerHandle.java:1165)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at gov.uspto.eai.generic.util.JMSClient.sendTextMessage(JMSClient.java:296)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at gov.uspto.eai.generic.mdb.AbstractEaiMDB.sendSuccessStatusMessage(AbstractEaiMDB.java:184)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at gov.uspto.eai.generic.mdb.AbstractEaiMDB.onMessage(AbstractEaiMDB.java:91)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:316)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:285)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:263)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.mq.jms.MQSession.run(MQSession.java:1650)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:960)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:813)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:614)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:581)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
[2/7/07 15:19:01:730 EST] 00000035 SystemErr R at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
[2/7/07 15:19:01:740 EST] 00000035 SystemErr R at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
[2/7/07 15:19:01:740 EST] 00000035 SystemErr R at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
[2/7/07 15:19:01:740 EST] 00000035 SystemErr R at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
[2/7/07 15:19:01:740 EST] 00000035 SystemErr R at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:456)
[2/7/07 15:19:01:740 EST] 00000035 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
--Saurav |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 07, 2007 12:24 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Search here for "2009". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
tosaurav |
Posted: Wed Feb 07, 2007 1:02 pm Post subject: |
|
|
Acolyte
Joined: 16 Jan 2007 Posts: 62
|
Following code I am using in Client...
Gone through few post in search of this key "2009" but couldnt get specific reason.Checked Keep-Alive value which is set to True also in changed min. connection for QCF but no impact.
In below code error generating from sendtextmessage.This client used to work but after upgrading RAD and Broker tool kit with latest version, the tower gets down.
public class JMSClient {
/**
* MQ user that has access to the queues
*/
protected String user = null;
/**
* Name of the queue that the instance of this class treats as default
* destination.
*/
protected String qName = null;
/**
* Name of the queue manager that the instance of this class treats as
* default.
*/
protected String qManagerName = null;
/**
* Name of the queue channel that the instance of this class treats as
* default.
*/
protected String qChannelName = null;
/**
* Name of the queue host that the instance of this class treats as default.
*/
protected String qHostName = null;
/**
* The queue port that the instance of this class treats as default.
*/
protected Integer qPort = null;
/**
* The transport type that the instance of this class treats as default.
*/
protected int qTransportType;
/**
* JNDI name for the queue configured in the server context.
*/
protected String qJNDIName = null;
/**
* JNDI name for the queue connection factory configured in the server
* context.
*/
protected String qcfJNDIName = null;
/**
* InitialContext wherein JNDI names for queue and queue connection factory
* can be searched.
*/
protected javax.naming.Context ctx = null;
/**
* The default queue that this instance uses.
*/
protected Queue queue_;
/**
* The default queue connection factory that this instance uses.
*/
protected javax.jms.ConnectionFactory qcf_;
/**
* The default queue connection that this instance uses.
*/
protected javax.jms.Connection qCon_;
/**
* The default session that this instance uses.
*/
protected javax.jms.Session qSession_;
/**
* Flag to indicate whether to use JNDI lookup or not.
*/
protected boolean useJNDI = false;
/**
* Flag to indicate initialization of defaults.
*/
protected boolean doneInit = false;
/**
* Constructs the instance by setting up defaults for connecting using MQ
* jars
*
* @param qManagerName
* the queue manager
* @param qChannelName
* the channel
* @param qHostName
* the host name
* @param qPort
* the port
* @param qName
* the name of the queue
* @param qTransportType
* the transport type used to connect
* @throws javax.naming.NamingException
* @throws JMSException
* indicates problems connecting with MQ
*/
public JMSClient(String qManagerName, String qChannelName,
String qHostName, Integer qPort, String qName, int qTransportType)
throws javax.naming.NamingException, JMSException {
this.qName = qName;
this.qManagerName = qManagerName;
this.qChannelName = qChannelName;
this.qHostName = qHostName;
this.qPort = qPort;
this.qTransportType = qTransportType;
useJNDI = false;
//init();
}
public JMSClient(String user, String qManagerName, String qChannelName,
String qHostName, Integer qPort, String qName, int qTransportType)
throws javax.naming.NamingException, JMSException
{
this.user = user;
this.qName = qName;
this.qManagerName = qManagerName;
this.qChannelName = qChannelName;
this.qHostName = qHostName;
this.qPort = qPort;
this.qTransportType = qTransportType;
useJNDI = false;
//init();
}
/**
* Constructs the instance with ability to use server side queue connection
* factory and queue through JNDI lookup
*
* @param qcfJNDIName
* the JNDI name for queue connection factory
* @param qJNDIName
* the JNDI name for queue
* @param ctx
* the initial context
* @throws javax.naming.NamingException
* @throws JMSException
*/
public JMSClient(String qcfJNDIName, String qJNDIName,
javax.naming.Context ctx) throws JMSClientException {
this.ctx = ctx;
this.qcfJNDIName = qcfJNDIName;
this.qJNDIName = qJNDIName;
useJNDI = true;
//init();
}
/**
* default constructor without any parameters
*/
protected JMSClient() {
}
/**
* initilize the defaults in the instance if not already initialized. Must be called before all other operations
*
* @throws NamingException
* Thrown if one of the queues or the queue connetion qcf_ can
* not be found by JNDI lookup
* @throws JMSException
* Throw if there is a JMS problem.
*/
public void init() throws JMSClientException {
if (doneInit)
return; // one liner if
try {
if (ctx != null) { // use JNDI lookup
Object obj = ctx.lookup(qcfJNDIName);
qcf_ = (javax.jms.ConnectionFactory) obj;
queue_ = (Queue) ctx.lookup(qJNDIName);
qCon_ = qcf_.createConnection();
qSession_ = qCon_.createSession(false,
javax.jms.Session.AUTO_ACKNOWLEDGE);
qCon_.start();
//System.out.println("JMSClient queue con started after JNDI
// lookup");
} else { // use direct client connection
com.ibm.mq.jms.MQQueueConnectionFactory mqFactory = new com.ibm.mq.jms.MQQueueConnectionFactory();
mqFactory.setQueueManager(qManagerName);
mqFactory.setChannel(qChannelName);
mqFactory.setHostName(qHostName);
mqFactory.setPort(qPort.intValue());
mqFactory.setTransportType(qTransportType);
qcf_ = mqFactory;
// not such a good way to cast but for now...
// connect with user if there is one
if(user != null)
{
qCon_ = ((QueueConnectionFactory) qcf_)
.createQueueConnection(user, "password");
}
else
{
qCon_ = ((QueueConnectionFactory) qcf_)
.createQueueConnection();
}
qSession_ = ((QueueConnection) qCon_).createQueueSession(
false, javax.jms.Session.AUTO_ACKNOWLEDGE);
queue_ = qSession_.createQueue(qName);
qCon_.start();
//System.out.println("JMSClient queue con started after
// creating
// MQQueueConnectionFactory");
}
doneInit = true;
}catch (JMSException jmsEx){
Exception ex = jmsEx.getLinkedException();
ex.printStackTrace();
}catch (RuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}catch (Exception e) {
throw new JMSClientException(e);
}
}
/**
* Sends a text message message setting user message headers from given HashMap
*
* @param text
* message to be sent
* @param properties
* JMSProperties to be set. Hashmap key = JMSProperty name, value =
* value.
* @throws JMSException
* Thrown on error
* @return void
*/
public void sendTextMessage(String mesgText, HashMap headerHM)
throws JMSClientException {
try {
connect();
// Create a sender from the session
MessageProducer qSender = null;
if (useJNDI) {
qSender = qSession_.createProducer(queue_);
} else {
qSender = ((QueueSession) qSession_).createSender(queue_);
}
// Create a message to send to the queue...
javax.jms.TextMessage message = qSession_
.createTextMessage(mesgText);
// message.setJMSReplyTo(queue_);
// set properties
if (headerHM != null) {
Set keys = headerHM.keySet();
for (Iterator iter = keys.iterator(); iter.hasNext() {
String key = (String) iter.next();
message.setObjectProperty(key, headerHM.get(key));
}
}
qSender.setDeliveryMode(1);
// ...now send the message
qSender.send(message);
qSender.close();
}catch (JMSException jmsEx){
Exception ex = jmsEx.getLinkedException();
ex.printStackTrace();
}catch (RuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}catch (Exception e) {
throw new JMSClientException(e);
} finally {
release();
}
}
/**
* Sends a bytes message from specified file and sets user message heades from specified HashMap
*
* @param file
* object message to be sent
* @param properties
* JMSProperties to be set. Hashmap key = JMSProperty name, value =
* value.
* @throws JMSException
* Thrown on error
*/
public void sendBytesMessage(File file, HashMap headerHM)
throws JMSClientException {
try {
java.io.FileInputStream fin = new java.io.FileInputStream(file);
sendBytesMessage(fin, headerHM);
} catch (Exception e) {
throw new JMSClientException(e);
}
}
/**
* Sends a bytes message from specified file stream and sets user message heades from specified HashMap
*
* @param FileinputSream
* Object Zip file which contains the Submission
* @param properties
* JMSProperties to be set. Hashmap key = JMSProperty name, value =
* value.
* @throws JMSException
* Thrown on error
*/
public void sendBytesMessage(java.io.FileInputStream fin, HashMap headerHM)
throws JMSClientException {
try {
connect();
// Create a sender from the session
MessageProducer qSender = null;
if (useJNDI) {
qSender = qSession_.createProducer(queue_);
} else {
qSender = ((QueueSession) qSession_).createSender(queue_);
}
// Create a message to send to the queue...
javax.jms.BytesMessage message = qSession_.createBytesMessage();
//javax.jms.StreamMessage message =
// qSession_.createStreamMessage();
//message.wait(100000000);
message.setJMSExpiration(240000);
byte[] buf = new byte[4096];
for (int nRead = 0; (nRead = fin.read(buf, 0, 4096)) != -1; message
.writeBytes(buf, 0, nRead))
; // empty for loop
// message.setJMSReplyTo(queue_);
// set properties
if (headerHM != null) {
Set keys = headerHM.keySet();
for (Iterator iter = keys.iterator(); iter.hasNext() {
String key = (String) iter.next();
message.setObjectProperty(key, headerHM.get(key));
}
}
// ...now send the message
qSender.send(message);
qSender.close();
// 11/3/2006
fin.close();
} catch (Exception e) {
throw new JMSClientException(e);
} finally {
try{
if(null!=fin)
fin.close();
}catch(Exception e){
System.out.println(" fileInputStream couldn't close correctly"+e.getMessage());
}
release();
}
}
/**
* Sends a bytes message specified and sets user message heades from specified HashMap
*
* @param FileinputSream
* Object Zip file which contains the Submission
* @param properties
* JMSProperties to be set. Hashmap key = JMSProperty name, value =
* value.
* @throws JMSException
* Thrown on error
*/
public void sendBytesMessage(BytesMessage mesg, HashMap headerHM)
throws JMSClientException {
try {
connect();
// Create a sender from the session
MessageProducer qSender = null;
if (useJNDI) {
qSender = qSession_.createProducer(queue_);
} else {
qSender = ((QueueSession) qSession_).createSender(queue_);
}
// message.setJMSReplyTo(queue_);
// set properties
if (headerHM != null) {
Set keys = headerHM.keySet();
for (Iterator iter = keys.iterator(); iter.hasNext() {
String key = (String) iter.next();
mesg.setObjectProperty(key, headerHM.get(key));
}
}
// ...now send the message
qSender.send(mesg);
qSender.close();
} catch (Exception e) {
throw new JMSClientException(e);
} finally {
release();
}
}
/**
* Sends a bytes message specified without any user message headers
*
* @param mesg
* @throws JMSException
*/
public void sendBytesMessage(BytesMessage mesg) throws JMSClientException {
sendBytesMessage(mesg, null);
}
/**
* Sends a message specified and sets user message heades from specified HashMap
*
* @param FileinputSream
* Object Zip file which contains the Submission
* @param properties
* JMSProperties to be set. Hashmap key = JMSProperty name, value =
* value.
* @throws JMSException
* Thrown on error
*/
public void sendMessage(javax.jms.Message mesg, HashMap headerHM)
throws JMSClientException {
try {
connect();
// Create a sender from the session
MessageProducer qSender = null;
if (useJNDI) {
qSender = qSession_.createProducer(queue_);
} else {
qSender = ((QueueSession) qSession_).createSender(queue_);
}
// message.setJMSReplyTo(queue_);
// set properties
if (headerHM != null) {
Set keys = headerHM.keySet();
for (Iterator iter = keys.iterator(); iter.hasNext() {
String key = (String) iter.next();
mesg.setObjectProperty(key, headerHM.get(key));
}
}
// ...now send the message
System.out
.println("Sending message to : " + queue_.getQueueName());
qSender.send(mesg);
qSender.close();
} catch (JMSException e) {
throw new JMSClientException(e);
} finally {
release();
}
}
public void sendMessageKeepConOpen(javax.jms.Message mesg)
throws JMSClientException {
try {
// Create a sender from the session
MessageProducer qSender = null;
if (useJNDI) {
qSender = qSession_.createProducer(queue_);
} else {
qSender = ((QueueSession) qSession_).createSender(queue_);
}
// message.setJMSReplyTo(queue_);
qSender.send(mesg);
qSender.close();
} catch (JMSException e) {
throw new JMSClientException(e);
}
}
/**
* Sends a message specified without setting user message headers
*
* @param mesg the message to be sent
* @throws JMSException
*/
public void sendMessage(javax.jms.Message mesg) throws JMSClientException {
sendMessage(mesg, null);
}
/**
* Sends a text message from specified String and without setting user message headers
*
* @param text
* message to be sent
* @throws JMSException
* thrown on error.
*/
public void sendTextMessage(String text) throws JMSClientException {
sendTextMessage(text, null);
}
/**
* Recieve an message out the input queue
*
* @param sentMessage corelated message if any else null
* @param timeOut waiting period before timeout
* @return Message message received or null
* @throws JMSException
*/
public Message receiveMessage(Message sentMessage, int timeOut)
throws JMSClientException {
// Receiving a reply message
Message message = null;
try {
connect();
System.out.println("Getting message from : "
+ queue_.getQueueName());
String selector = null;
if (sentMessage != null) {
selector = "JMSCorrelationID = '"
+ sentMessage.getJMSMessageID() + "'";
}
// Create a receiverr from the session
MessageConsumer qReceiver = null;
if (useJNDI) {
qReceiver = qSession_.createConsumer(queue_, selector);
} else {
qReceiver = ((QueueSession) qSession_).createReceiver(queue_);
}
if (timeOut < 0) //unlimited
timeOut = 0;
message = qReceiver.receive(timeOut);
qReceiver.close();
} catch (Exception e) {
throw new JMSClientException(e);
} finally {
release();
}
return message;
}
/**
* Recieve an message out the input queue
*
* @param sentMessage
* corelated message if any else null
* @param timeOut
* waiting period before timeout
* @return Message message received or null
* @throws JMSException
*/
public Message receiveMessageKeepConOpen(int timeOut)
throws JMSClientException
{
// Receiving a reply message
Message message = null;
try
{
// Create a receiverr from the session
MessageConsumer qReceiver = null;
if(useJNDI)
{
qReceiver = qSession_.createConsumer(queue_);
}
else
{
qReceiver = ((QueueSession) qSession_).createReceiver(queue_);
}
if(timeOut < 0) //unlimited
timeOut = 0;
message = qReceiver.receive(timeOut);
qReceiver.close();
}
catch(Exception e)
{
throw new JMSClientException(e);
}
return message;
}
/**
* Receives message with wait time of 5
*
* @return Message the received message or null
* @throws JMSException
*/
public Message receiveMessage() throws JMSClientException {
return receiveMessage(null, 5);
}
/**
* Gets count of messages in the queue.
*
* @return int count of the messages
* @throws JMSException
*/
public int getMessageCount() throws JMSClientException {
try {
connect();
Message message = null;
queue_ = qSession_.createQueue(qName);
// Create a browser from the session
javax.jms.QueueBrowser qBrowser = ((QueueSession) qSession_)
.createBrowser(queue_);
System.out.println("Browsing messages of : "
+ queue_.getQueueName());
int i = 0;
for (Enumeration e = qBrowser.getEnumeration(); e
.hasMoreElements(); i++) {
message = (Message) e.nextElement();
}
qBrowser.close();
return i;
} catch (Exception e) {
throw new JMSClientException(e);
} finally {
release();
}
}
/**
* Browses message at given position in the queue.
*
* @param index position of the message in the queue.
* @return Message browsed message
* @throws JMSException
*/
public Message browseMessage(int index) throws JMSClientException {
try {
connect();
Message message = null;
queue_ = qSession_.createQueue(qName);
// Create a browser from the session
javax.jms.QueueBrowser qBrowser = ((QueueSession) qSession_)
.createBrowser(queue_);
int i = 0;
for (Enumeration e = qBrowser.getEnumeration(); e
.hasMoreElements(); i++) {
message = (Message) e.nextElement();
if (i == index) {
break;
}
}
qBrowser.close();
return message;
} catch (Exception e) {
throw new JMSClientException(e);
} finally {
release();
}
}
/**
* Browse given number of messages starting at given index in the queue.
*
* @param startIndex index of the first message to be browsed
* @param nMesgs number of messages to be browsed
* @return Message[] array of messages browsed
* @throws JMSException
*/
public Message[] browseMessages(int startIndex, int nMesgs)
throws JMSClientException {
try {
connect();
Message message = null;
// Create a browser from the session
javax.jms.QueueBrowser qBrowser = ((QueueSession) qSession_)
.createBrowser(queue_);
ArrayList mesgAList = new ArrayList(nMesgs);
int i = 0;
for (Enumeration e = qBrowser.getEnumeration(); e
.hasMoreElements(); i++) {
message = (Message) e.nextElement();
if (i >= startIndex && i < startIndex + nMesgs) {
mesgAList.add(message);
}
}
qBrowser.close();
return (Message[]) mesgAList.toArray();
} catch (Exception e) {
throw new JMSClientException(e);
} finally {
release();
}
}
/**
* Establishes and starts the connection with MQ
*
* @throws JMSClientException
*/
public void connect() throws JMSClientException {
try {
release();
doneInit = false;
init();
}catch (Exception e) {
throw new JMSClientException(e);
}
}
/**
* release any resources like connection, session.
*/
public void release() {
if (qSession_ != null)
try {
qSession_.close();
} catch (Exception e) {
}
if (qCon_ != null)
try {
qCon_.close();
} catch (Exception e) {
}
qSession_ = null;
qCon_ = null;
}
/**
* make sure that release is called in case of need to finalize.
*
* @throws Throwable
* never thown
*/
protected void finalize() throws java.lang.Throwable {
release();
super.finalize();
}
/**
* String rersentation of object
*
* @return the string representation
*/
public String toString() {
String retValue;
retValue = super.toString();
return retValue;
}
/**
* get text from message
*
* @param message
* message to get text from
* @throws JMSException
* thrown on errro
* @return String the text of the message
*/
public static String getText(Message message)
throws javax.jms.JMSException {
String text = null;
if (message instanceof javax.jms.BytesMessage) {
text = ((javax.jms.BytesMessage) message).readUTF();
} else if (message instanceof javax.jms.TextMessage) {
text = ((javax.jms.TextMessage) message).getText();
}
return text;
}
/**
* get all properties that do not begin with JMS
*
* @param mesg
* message who's properties are gotten
* @throws JMSException
* thrown on error
* @return HashMap properties may be a an empty Hashmap but will not be null.
*/
public static HashMap getUserProperties(Message mesg)
throws javax.jms.JMSException {
HashMap map = new HashMap();
for (java.util.Enumeration e = mesg.getPropertyNames(); e
.hasMoreElements() {
String key = (String) e.nextElement();
if (!key.startsWith("JMS")) {
Object obj = mesg.getObjectProperty(key);
map.put(key, obj);
}
}
return map;
}
} |
|
Back to top |
|
 |
tosaurav |
Posted: Wed Feb 07, 2007 1:16 pm Post subject: |
|
|
Acolyte
Joined: 16 Jan 2007 Posts: 62
|
Event Viewer for application log says
----- amqxfdcp.c : 773 --------------------------------------------------------
2/7/2007 16:10:38 - Process(2984.36) User(MUSR_MQADMIN) Program(amqrmppa.exe)
AMQ6125: An internal WebSphere MQ error has occurred.
EXPLANATION:
An internal error has occurred with identifier 0. This message is issued in
association with other messages.
ACTION:
Use the standard facilities supplied with your system to record the problem
identifier, and to save the generated output files. Contact your IBM support
center. Do not discard these files until the problem has been resolved.
----- amqxfdcp.c : 735 --------------------------------------------------------
2/7/2007 16:10:38 - Process(2984.36) User(MUSR_MQADMIN) Program(amqrmppa.exe)
AMQ6184: An internal WebSphere MQ error has occurred on queue manager
QM.WEBAPP.BRK.PROD.
EXPLANATION:
An error has been detected, and the WebSphere MQ error recording routine has
been called. The failing process is process 2984.
ACTION:
Use the standard facilities supplied with your system to record the problem
identifier, and to save the generated output files. Contact your IBM support
center. Do not discard these files until the problem has been resolved.
----- amqxfdcp.c : 773 -------------------------------------------------------- |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Feb 07, 2007 2:08 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
find the FDC being generated and post only the top part. You'll see a "probe id". You can search the IBM website with it.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tosaurav |
Posted: Thu Feb 08, 2007 7:09 am Post subject: |
|
|
Acolyte
Joined: 16 Jan 2007 Posts: 62
|
| |
| WebSphere MQ First Failure Symptom Report |
| ========================================= |
| |
| Date/Time :- Wed February 07 12:00:12 Eastern Standard Time 2007 |
| Host Name :- WS91052 (Windows XP Build 2600: Service Pack 2) |
| PIDS :- 5724H7200 |
| LVLS :- 6.0.0.0 |
| Product Long Name :- WebSphere MQ for Windows |
| Vendor :- IBM |
| Probe Id :- RM046002 |
| Application Name :- MQM |
| Component :- rriMQIServer |
| SCCS Info :- lib/remote/amqrsrva.c, 1.153 |
| Line Number :- 424 |
| Build Date :- May 19 2005 |
| CMVC level :- p000-L050519 |
| Build Type :- IKAP - (Production) |
| UserID :- MUSR_MQADMIN |
| Process Name :- C:\Program Files\IBM\WebSphere MQ\bin\amqrmppa.exe |
| Process :- 00002984 |
| Thread :- 00000010 |
| QueueManager :- QM!WEBAPP!BRK!PROD |
| ConnId(1) IPCC :- 306 |
| ConnId(3) QM-P :- 115 |
| Major Errorcode :- OK |
| Minor Errorcode :- OK |
| Probe Type :- INCORROUT |
| Probe Severity :- 4 |
| Probe Description :- AMQ6125: An internal WebSphere MQ error has occurred. |
| FDCSequenceNumber :- 0 |
|
Back to top |
|
 |
EddieA |
Posted: Thu Feb 08, 2007 10:47 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Did you search the IBM web site using the Probe ID. What did you find.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
tosaurav |
Posted: Fri Feb 09, 2007 6:43 am Post subject: |
|
|
Acolyte
Joined: 16 Jan 2007 Posts: 62
|
searched the forums and found one has to apply CSD but most of the suggestion reflect CSD apply on version 5.3 or other than 6.0 which is my MQ version.
Bottomline is I am not getting concrete solution and able to figure out the reason. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Feb 09, 2007 7:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What verison is the client install?
It might also help to apply maintenance to your 6.0.0.0 qmgr. Current version is 6.0.2.0. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Fri Feb 09, 2007 7:07 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Looks like it is time to do what it says......
Quote: |
ACTION:
Use the standard facilities supplied with your system to record the problem
identifier, and to save the generated output files. Contact your IBM support
center. Do not discard these files until the problem has been resolved.
|
Please keep us posted  |
|
Back to top |
|
 |
tosaurav |
Posted: Mon Feb 12, 2007 12:47 pm Post subject: |
|
|
Acolyte
Joined: 16 Jan 2007 Posts: 62
|
I apply the refresh pack too but still not working and here is the FDC details...
WebSphere MQ First Failure Symptom Report |
| ========================================= |
| |
| Date/Time :- Mon February 12 15:17:02 Eastern Standard Time 2007 |
| Host Name :- WS91052 (Windows XP Build 2600: Service Pack 2) |
| PIDS :- 5724H7200 |
| LVLS :- 6.0.2.0 |
| Product Long Name :- WebSphere MQ for Windows |
| Vendor :- IBM |
| Probe Id :- RM046002 |
| Application Name :- MQM |
| Component :- rriMQIServer |
| SCCS Info :- lib/remote/amqrsrva.c, 1.153.1.8 |
| Line Number :- 433 |
| Build Date :- Sep 21 2006 |
| CMVC level :- p600-200-060921 |
| Build Type :- IKAP - (Production) |
| UserID :- MUSR_MQADMIN |
| Process Name :- C:\Program Files\IBM\WebSphere MQ\bin\amqrmppa.exe |
| Addressing mode :- 32-bit |
| Process :- 00001400 |
| Thread :- 00000007 |
| QueueManager :- QM!WEBAPP!BRK!PROD |
| ConnId(1) IPCC :- 1372 |
| ConnId(3) QM-P :- 1479 |
| Major Errorcode :- OK |
| Minor Errorcode :- OK |
| Probe Type :- INCORROUT |
| Probe Severity :- 4 |
| Probe Description :- AMQ6125: An internal WebSphere MQ error has occurred. |
| FDCSequenceNumber :- 0 |
| Arith1 :- 977 3d1 |
| Arith2 :- 2588 a1c |
| |
|
Back to top |
|
 |
EddieA |
Posted: Mon Feb 12, 2007 1:54 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
jefflowrey wrote: |
What verison is the client install? |
That error is generated by using a back level Client, not Server.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
tosaurav |
Posted: Mon Feb 12, 2007 2:28 pm Post subject: |
|
|
Acolyte
Joined: 16 Jan 2007 Posts: 62
|
Please suggest me what action i need to take now.What client changes I need to make. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 12, 2007 4:00 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
make sure client and server are at the same version.... _________________ MQ & Broker admin |
|
Back to top |
|
 |
tosaurav |
Posted: Tue Feb 13, 2007 7:42 am Post subject: |
|
|
Acolyte
Joined: 16 Jan 2007 Posts: 62
|
With same client and server version means what...Please provide me details.
Following is my env. details ::
MQ version is 6.0.2.0
WAS 6.0
RSA 6.0.1
Client JMS lib has below files
com.ibm.mq.jar - Implementation-Version: 5.306 - j5306-08-040914
com.ibm.mqbind.jar - Manifest-Version: 1.0, Created-By: 1.3.0 (IBM Corporation)
com.ibm.mqjms.jar - Implementation-Version: 5.306 - j5306-08-040914
jms.jar - Manifest-Version: 1.0 , Created-By: 1.3.1_02 (Sun Microsystems Inc.)
connector.jar : Manifest-Version: 1.0, Created-By: 1.3.0 (Sun Microsystems Inc.) |
|
Back to top |
|
 |
|