| Author | 
		  Message
		 | 
		
		  | sudheer | 
		  
		    
			  
				 Posted: Fri Sep 08, 2006 5:44 pm    Post subject: JMS message transmission errors | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 08 Sep 2006 Posts: 5
  
  | 
		  
		    
			  
				Hi All,
 
 
I have some weird problem. I have JMS client connecting to MQSeries5.3 on AIX. It transmitts and receives messages of all sizes. But when I tried to send message with size falling in range (32250 - 32650) bytes it gives the following exception after writing the message to the queue and when the process tries to disconnect.
 
 
linked exception: com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
 
java.lang.Exception: javax.jms.JMSException: MQJMS2000: failed to close MQ queue
 
 
On the server side the MQ shows
 
 
AMQ9208: Error on receive from host xxx.xx.xxx.xx.
 
 
EXPLANATION:
 
An error occurred receiving data from xxx.xx.xxx.xx over TCP/IP. This may be
 
due to a communications failure.
 
ACTION:
 
The return code from the TCP/IP (read) call was 73 (X'49'). Record these values
 
and tell the systems administrator.
 
 
Any ideas?....
 
Thanks in advance. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Fri Sep 08, 2006 6:57 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 Location: LI,NY 
  | 
		  
		    
			  
				If your patch level is under CSD 11 the best advice we can give you is to upgrade...    _________________ MQ & Broker admin | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sudheer | 
		  
		    
			  
				 Posted: Sat Sep 09, 2006 8:29 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 08 Sep 2006 Posts: 5
  
  | 
		  
		    
			  
				| We are on CSD12. I guess it is the latest fix available. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Sat Sep 09, 2006 8:39 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				Can you be more clear that you can easily send messages that are LARGER than that range? _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sudheer | 
		  
		    
			  
				 Posted: Sat Sep 09, 2006 9:01 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 08 Sep 2006 Posts: 5
  
  | 
		  
		    
			  
				Yes I can send messages larger than the range. Our message size is limited to 4 MB and I can send the messages of all sizes except that range.
 
 
When I send the message (in range) on the other end the message is received with few bytes as nulls at the end.
 
 
I tired even sending the message (in range) with the MQ API's but even they gave the same error. Below is error. 
 
 
MQJE001: Completion Code 2, Reason 2009
 
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
 
MQJE003: IO error transmitting message buffer
 
MQJE001: Completion Code 2, Reason 2009
 
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
 
MQJE003: IO error transmitting message buffer
 
MQJE001: Completion Code 2, Reason 2009
 
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
 
MQJE003: IO error transmitting message buffer
 
MQJE001: Completion Code 2, Reason 2009
 
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
 
MQJE003: IO error transmitting message buffer
 
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
 
MQJE003: IO error transmitting message buffer
 
MQJE001: Completion Code 2, Reason 2009
 
MQJE001: Completion Code 2, Reason 2019
 
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
 
	at com.ibm.mq.MQManagedObject.close(MQManagedObject.java:400)
 
	at com.ibm.mq.MQQueue.close(MQQueue.java:1720) | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sudheer | 
		  
		    
			  
				 Posted: Sat Sep 09, 2006 9:10 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 08 Sep 2006 Posts: 5
  
  | 
		  
		    
			  
				Here is the code which sends the message. 
 
 
import javax.jms.JMSException;
 
import javax.jms.QueueConnection;
 
import javax.jms.QueueSender;
 
import javax.jms.QueueSession;
 
import javax.jms.Session;
 
import javax.jms.TextMessage;
 
 
 
public class MessageSender {
 
 
	private MQConnection		MQutil;
 
	private QueueConnection		connection	= null;
 
	private QueueSession		session		= null;
 
	private QueueSender		sender		= null;
 
	private TextMessage		message;
 
 
	/**
 
	 * 
 
	 * @throws Exception
 
	 */
 
	public MessageSender() throws Exception {
 
		this.MQutil = new MQConnection();
 
	}
 
 
	/**
 
	 * 
 
	 * @param CLMmsg
 
	 * @param timestamp
 
	 * @return
 
	 * @throws Exception
 
	 */
 
	public String sendMessage(String CLMmsg, long timestamp) throws Exception {
 
		try {
 
			connect();
 
			this.message = this.session.createTextMessage();
 
			this.message.setJMSReplyTo(MQutil.getOUTQueue());
 
			this.message.setText(CLMmsg);
 
			this.message.setJMSTimestamp(timestamp);
 
			this.sender.send(this.message);			
 
			disconnect();
 
		} catch (JMSException e) {
 
			Exception linkedExc = e.getLinkedException();
 
			if (linkedExc != null) {
 
				System.err.println("linked exception: " + linkedExc);
 
			}
 
			throw new Exception(e);
 
		}
 
		return this.message.getJMSMessageID();
 
	}
 
 
	/**
 
	 * 
 
	 * @throws Exception
 
	 */
 
	public void connect() throws Exception {
 
		this.connection = this.MQutil.getConnection();
 
		this.session = this.connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
 
		this.sender = this.session.createSender(this.MQutil.getINQueue());
 
	}
 
 
	/**
 
	 * 
 
	 * @throws JMSException
 
	 */
 
	public void disconnect() throws JMSException {
 
		this.sender.close();
 
		this.session.close();
 
		this.connection.close();
 
	}
 
 
	/**
 
	 * 
 
	 * @return
 
	 * @throws Exception
 
	 */
 
	public String getCorrelationId() throws Exception {
 
		return this.message.getJMSMessageID();
 
	}
 
} | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Sat Sep 09, 2006 11:47 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				You should open a PMR.
 
 
Also, you're using "this" a lot, and I don't think it's necessary.  maybe this is just a style point, but it looks ugly and confusing to me. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | JasonE | 
		  
		    
			  
				 Posted: Sat Sep 09, 2006 1:14 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 03 Nov 2003 Posts: 1220 Location: Hursley 
  | 
		  
		    
			  
				Note just to clarify, the important bit about the fixpack (csd) level is for the Java JARs, not the server side - I know you said you are at 12, but just validating that you are talking about the client side.
 
 
Are there any fdc;s on the server side. If you are at fixpack 12 with backlevel clients containing the problem I can think of, its quite possible for the channel to be terminated with an FDC. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sudheer | 
		  
		    
			  
				 Posted: Tue Sep 12, 2006 2:42 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Newbie
 
 Joined: 08 Sep 2006 Posts: 5
  
  | 
		  
		    
			  
				Here are the steps to trigger the error.
 
 
1. Make the targclient to MQ (in JNDI) for the sending queue
 
2. Send the message falling in 32227 - 32270 bytes range
 
 
It will through the error. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |