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 » MQJMS3011 (Failed to Publish to MQ Queue)

Post new topic  Reply to topic
 MQJMS3011 (Failed to Publish to MQ Queue) « View previous topic :: View next topic » 
Author Message
Naftalanja
PostPosted: Tue Mar 19, 2002 9:37 am    Post subject: Reply with quote

Acolyte

Joined: 30 Jan 2002
Posts: 63
Location: Los Angeles

Hi all i am using MQ for JMS (java classes) and i have applied the patch for pub/sub in MQ and also i have run the utility runmqsc Qmgr < MQPS_*.mqsc . That solved my problem of creating a Topic Publisher. Now when i try to execute the following code

QueueName = "SYSTEM.BOKER.CONTROL.QUEUE"
QMgr = "My.QMGR"

topicConFactory = (MQTopicConnectionFactory) getTopicConnectionFactory(QueueManager);
topicConFactory.setHostName(HostName);
topicConFactory.setPort(1417);
topicConFactory.setBrokerQueueManager(QueueManager);
topicConFactory.setBrokerPubQueue(QueueName);
// topicConFactory.setBrokerControlQueue(QueueName);
Connection = (MQTopicConnection) topicConFactory.createTopicConnection();
session = (MQTopicSession) Connection.createTopicSession(isJTAEnabled,session.AUTO_ACKNOWLEDGE);
topic = (MQTopic) session.createTopic(TopicName);
topic.setBaseTopicName("Employee");

pub = (MQTopicPublisher) session.createPublisher(topic);
msg = session.createTextMessage("Hello...");
System.out.println(pub.getTopic().getTopicName());


// pub.publish(topic, msg);
pub.publish(msg);

Now it throws me an error

MQJMS3011: Failed to publish message to MQ queue
javax.jms.JMSException: MQJMS3011: Failed to publish message to MQ queue
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.jms.JMSException(java.lang.String, java.lang.String)
javax.jms.JMSException com.ibm.mq.jms.services.ConfigEnvironment.newException(java.lang.String)


ps. Even though i dont set the topicConFactory.setBrokerPubQueue(QueueName) it throws me the same error.

Has any one been thru this prob ? if so could you please help me finding the solution ?? Anyhelp will be greatly appreciated.

Back to top
View user's profile Send private message Send e-mail
Naftalanja
PostPosted: Tue Mar 19, 2002 9:38 am    Post subject: Reply with quote

Acolyte

Joined: 30 Jan 2002
Posts: 63
Location: Los Angeles

I am sorry t inlcude that, the error throws at
pub.publish(msg) the last line. thanx
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Tue Mar 19, 2002 10:49 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

The JMSException has a method called getLinkedException() which itself returns an Exception object reference. If you could issue the toString() method call on this exception and print out the results, that would be very helpful.

See page 177 of the current Using Java manual.
Back to top
View user's profile Send private message
Naftalanja
PostPosted: Tue Mar 19, 2002 11:22 am    Post subject: Reply with quote

Acolyte

Joined: 30 Jan 2002
Posts: 63
Location: Los Angeles

Thanks for the tip, i have implemented the following in the code

try
{
pub.publish(msg);
} catch (JMSException je)
{
System.out.println("caught " + je);
Exception e = je.getLinkedException();
if(e != null)
{
System.err.println("Linked Exception " + e);
System.out.println("To String " + e.toString());
}
}
The Message is as follows

caught javax.jms.JMSException: MQJMS3011: Failed to publish message to MQ queue
Linked Exception com.ibm.mq.MQException: Completion Code 2, Reason 2334
To String com.ibm.mq.MQException: Completion Code 2, Reason 2334

Any klues kolban !!!!
Back to top
View user's profile Send private message Send e-mail
Naftalanja
PostPosted: Tue Mar 19, 2002 2:48 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Jan 2002
Posts: 63
Location: Los Angeles

Hmmmm i still get the same error. Let me iterate once again and tell me if am doing wrong.

01) I have installed ma88
02) Pub/sub for Mq series
03) started broker on the queuemanager
04) did runmqsc qmgr < MQJMS_PSQ.mqsc
05) Using the MQ Jms classes for publishing.

Am i missing something ???

its freaking me out !!!
Back to top
View user's profile Send private message Send e-mail
Naftalanja
PostPosted: Wed Mar 20, 2002 11:49 am    Post subject: Reply with quote

Acolyte

Joined: 30 Jan 2002
Posts: 63
Location: Los Angeles

I currently have MQSeries 5.2.1, but the Pub/Sub patch for MQSeries is for 5.2. I am facing problems while publishing the messages. I assume that, its because of the the conflict of Version of MQ Series Server (Ver 5.2.1)
i have and the Pub/Sub patch (for ver 5.2).

Can anyone pliz help me, i am thinking to uninstall MQSeries 5.2.1 and install MQSeries 5.2. Its been 3 daz and its freakin me out. I am using basic MQ JMS classes for publishing the message.

Prob: Invalid RFH header.
caught javax.jms.JMSException: MQJMS3011: Failed to publish message to MQ queue
MQJMS3011: Failed to publish message to MQ queue
Linked Exception com.ibm.mq.MQException: Completion Code 2, Reason 2334

Reason 2334 leads to Invalid RFH header.

thanx
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQJMS3011 (Failed to Publish to MQ Queue)
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.